1
0
mirror of https://github.com/livingcomputermuseum/UniBone.git synced 2026-03-09 20:18:37 +00:00

PRU generated wrong GRANT OUT on REQUEST

This commit is contained in:
Joerg Hoppe
2019-11-01 12:33:57 +01:00
parent 1a1b2d6063
commit 6c9f41dd2b
9 changed files with 30 additions and 18 deletions

View File

@@ -269,7 +269,7 @@ char *unibusdevice_c::get_unibus_resource_info(void) {
slot_to = std::max(slot_to, (*it)->get_priority_slot());
}
if (slot_from > slot_to) // no requests: use devcie parameter
if (slot_from > slot_to) // no requests: use device parameter
slot_from = slot_to = priority_slot.value;
if (slot_from == slot_to)
sprintf(tmpbuff, ", slot %u", (unsigned) slot_from);

View File

@@ -159,8 +159,9 @@ void main(void) {
// "set" is inverting!
cpu_grant_mask = buslatches_getbyte(0) & PRIORITY_ARBITRATION_BIT_MASK; // read GRANT IN
// forward un-requested GRANT IN to GRANT OUT for other cards on neighbor slots
buslatches_setbits(0, PRIORITY_ARBITRATION_BIT_MASK & ~sm_arb.device_request_mask, ~cpu_grant_mask)
;
uint8_t grant_out_mask = cpu_grant_mask & ~sm_arb.device_request_mask ;
buslatches_setbits(0, PRIORITY_ARBITRATION_BIT_MASK, ~grant_out_mask)
;
}
// handle GRANT/SACK/BBSY for emulated devices
uint8_t granted_request = sm_device_arb_worker(cpu_grant_mask); // devices process GRANT

View File

@@ -271,7 +271,7 @@ uint8_t sm_arb_worker_cpu() {
timeout_cleanup(TIMEOUT_SACK);
}
// put the single BR/NPR GRANT onto GRANT OUT BUS line, latches inverted.
// visible for physical devices, not for emulated devcies on this UniBone
// visible for physical devices, not for emulated devices on this UniBone
buslatches_setbits(0, PRIORITY_ARBITRATION_BIT_MASK, ~sm_arb.arbitrator_grant_mask )
;

View File

@@ -83,11 +83,7 @@ statemachine_state_func sm_data_slave_start() {
// addr8..15 = latch[3]
// addr 16,17 = latch[4].0,1
addr = latch2val | ((uint32_t) latch3val << 8) | ((uint32_t) (latch4val & 3) << 16);
//if (addr == 01046) // trigger address
// PRU_DEBUG_PIN0(1) ; // trigger to LA.
// make bool of a17..a13. iopage, if a17..a13 all 1's
// iopage = ((latch3val & 0xe0) | (latch4val & 3)) == 0xe3;
// 2 statements above = 12 cycles = 60ns
@@ -98,6 +94,12 @@ statemachine_state_func sm_data_slave_start() {
// !!! Attention: on fast UNIBUS cycles to other devices,
// !!! SSYN may already be asserted. Or MSYN may even be inactive again !!!
// if (addr == 0 && control == UNIBUS_CONTROL_DATI) // trigger address, after boot
// PRU_DEBUG_PIN0(1) ; // trigger to LA.
//if (addr >= 0777560 && addr <= 0777566) // trigger address, after boot
// PRU_DEBUG_PIN0(1) ; // trigger to LA.
// page_table_entry = PAGE_TABLE_ENTRY(deviceregisters,addr) ; // is addr ignored,memory,iopage?
// if (addr >= 0x8000 && addr < 0x10000)
// page_table_entry = PAGE_MEMORY ;

View File

@@ -74,7 +74,7 @@ private:
// false: no running CPU on UNIBUS (physical or emulated)
// devices do DMA without NPR/NPG protocol
// true: active CPU. devcies pus perform Request/Grant/SACK protocoll
// true: active CPU. devices perform Request/Grant/SACK protocoll
bool arbitrator_active;
public:

View File

@@ -966,6 +966,8 @@ uda_c::DMAWrite(
uint8_t* buffer)
{
assert ((lengthInBytes % 2) == 0);
// if (address >= 0x40000)
// logger->dump(logger->default_filepath) ;
assert (address < 0x40000);
unibusadapter->DMA(dma_request, true,

View File

@@ -102,7 +102,7 @@ bool application_c::parse_slot(char *txt, uint8_t *priority_slot) {
void application_c::print_arbitration_info(const char *indent) {
if (unibus->get_arbitrator_active()) {
printf("%s\"UniBone devcies are clients to PDP-11 CPU doing NPR/INTR Arbitrator\n",
printf("%s\"UniBone devices are clients to PDP-11 CPU doing NPR/INTR Arbitrator\n",
indent);
printf("%s(CPU active, console processor inactive).\n", indent);
printf("%sCPU is physical or emulated.\n", indent);

View File

@@ -8,11 +8,14 @@ m i # install max UNIBUS memory
# Deposit bootloader into memory
m ll du.lst
en uda # enable UDA50 controller
# mount 2.11bSD in drive #0 and start
en uda0 # enable drive #0
sd uda0 # select drive #0
p type RA72
p image 2.11BSD_44.ra72 # mount image file with test pattern
p type RA92
p image 2.11BSD_44.ra92 # mount image file with test pattern
.print MSCP drives ready.
.print UDA50 boot loader installed.

View File

@@ -1,3 +1,5 @@
; after http://www.vaxman.de/publications/bsd211_inst.pdf
; model a PDP-11/44 with maximum memory, fpu, no CIS
set cpu 11/44 4096K fpp nocis
@@ -11,7 +13,6 @@ set rp disabled
set rk disabled
set xu disabled
set xq disabled
set rl disabled
set rx disabled
set tm disabled
set ts disabled
@@ -23,8 +24,12 @@ set tto 7b
; set the boot disk as a 1GB RA72 on an MSCP UDA50
set rq enabled
set rq0 ra72
attach rq0 2.11BSD_44.ra72
set rq0 ra92
attach rq0 2.11BSD_44.ra92
; boot tape
set ts enable
attach ts 211bsd.tap
; set one DZ11 8 line async mux
; accessible via telnet to 127.0.0.1:4000...4007
@@ -37,7 +42,7 @@ attach -am dz 4000
; set one DELUA/DEUNA unibus enet controller
; ==> must setup eth0/eth1 per your system config
set xu enabled
set xu type=deuna
set xu type=delua
attach xu eth0
; enable one tape device on a TMSCP controller
@@ -46,6 +51,5 @@ set tq enabled
; show our config
show devices
set cons telnet=23
; boot it
; set cons telnet=23
boot rq0