mirror of
https://github.com/verilator/verilator.git
synced 2025-01-09 16:17:36 +00:00
27 lines
604 B
Coq
27 lines
604 B
Coq
|
// $Id$
|
||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||
|
//
|
||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||
|
// without warranty, 2006 by Wilson Snyder.
|
||
|
|
||
|
`define RegDel 1
|
||
|
|
||
|
module t_mem_slot (Clk, SlotIdx, BitToChange, BitVal, SlotToReturn, OutputVal);
|
||
|
|
||
|
input Clk;
|
||
|
input [1:0] SlotIdx;
|
||
|
input BitToChange;
|
||
|
input BitVal;
|
||
|
input [1:0] SlotToReturn;
|
||
|
output [1:0] OutputVal;
|
||
|
|
||
|
reg [1:0] Array[0:2];
|
||
|
|
||
|
always @(posedge Clk)
|
||
|
begin
|
||
|
Array[SlotIdx][BitToChange] <= #`RegDel BitVal;
|
||
|
|
||
|
OutputVal = Array[SlotToReturn];
|
||
|
end
|
||
|
endmodule
|