/////////////////////////////////////////////////////////////////////// // // bus_watch module // /////////////////////////////////////////////////////////////////////// module bus_watch( demux_bus.Observer Bus ); timeunit 1ns; timeprecision 100ps; // $setuphold etc don't like "Bus.xxx" so create local copies: wire [15:0] Address = Bus.Address; wire [15:0] Data = Bus.Data; wire ALE = Bus.ALE; wire RnW = Bus.RnW; wire nOE = Bus.nOE; wire nME = Bus.nME; specify specparam tViolate=250; $width(posedge ALE, tViolate); $width(negedge ALE, tViolate); $width(negedge nME, tViolate); $width(posedge nME, tViolate); $width(negedge RnW &&& ~nME, tViolate); $width(posedge RnW &&& ~nME, tViolate); $setuphold(negedge ALE, Data, tViolate, tViolate); $setuphold(edge[10, 01] nME, Address, tViolate, tViolate); $setuphold(edge[10, 01] nME, RnW, tViolate, tViolate); $setuphold(edge[10, 01] nME, nOE, tViolate, tViolate); $setuphold(edge[01] nME &&& ~RnW, Data, tViolate, tViolate); endspecify always @(Address) address_stable: assert ( nME == 1 ) else $display("Assertion failed: Address changes while nME is low at time %d ns", $time); endmodule