1
0
mirror of https://github.com/livingcomputermuseum/UniBone.git synced 2026-05-05 07:24:45 +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: