File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ def sim_test():
438438 self .assertEqual ((yield dut .bus .sel ), 0b1111 )
439439 self .assertEqual ((yield dut .bus .we ), 1 )
440440 self .assertEqual ((yield dut .bus .dat_w ), 0x12345678 )
441- self .assertEqual ((yield dut .bus .lock ), 1 )
441+ self .assertEqual ((yield dut .bus .lock ), 0 )
442442 self .assertEqual ((yield dut .bus .cti ), CycleType .CLASSIC .value )
443443 self .assertEqual ((yield dut .bus .bte ), BurstTypeExt .LINEAR .value )
444444 self .assertEqual ((yield intr_1 .dat_r ), 0xabcdef01 )
Original file line number Diff line number Diff line change @@ -99,6 +99,9 @@ class Interface(Record):
9999 Optional. Corresponds to Wishbone signal ``STALL_I`` (initiator) or ``STALL_O`` (target).
100100 lock : Signal()
101101 Optional. Corresponds to Wishbone signal ``LOCK_O`` (initiator) or ``LOCK_I`` (target).
102+ nmigen-soc Wishbone support assumes that initiators that don't want bus arbitration to happen in
103+ between two transactions need to use ``lock`` feature to guarantee this. An initiator without
104+ the ``lock`` feature may be arbitrated in between two transactions even if ``cyc`` is kept high.
102105 cti : Signal()
103106 Optional. Corresponds to Wishbone signal ``CTI_O`` (initiator) or ``CTI_I`` (target).
104107 bte : Signal()
@@ -414,7 +417,7 @@ def elaborate(self, platform):
414417 ]
415418 m .d .comb += self .bus .cyc .eq (intr_bus .cyc )
416419 if hasattr (self .bus , "lock" ):
417- m .d .comb += self .bus .lock .eq (getattr (intr_bus , "lock" , 1 ))
420+ m .d .comb += self .bus .lock .eq (getattr (intr_bus , "lock" , 0 ))
418421 if hasattr (self .bus , "cti" ):
419422 m .d .comb += self .bus .cti .eq (getattr (intr_bus , "cti" , CycleType .CLASSIC ))
420423 if hasattr (self .bus , "bte" ):
You can’t perform that action at this time.
0 commit comments