From 7764d0ba1dcf064ae487ee985c43083a0909e7f4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 5 Jan 2013 11:13:26 +0100 Subject: initial import --- tests/asicworld/code_hdl_models_dlatch_reset.v | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/asicworld/code_hdl_models_dlatch_reset.v (limited to 'tests/asicworld/code_hdl_models_dlatch_reset.v') diff --git a/tests/asicworld/code_hdl_models_dlatch_reset.v b/tests/asicworld/code_hdl_models_dlatch_reset.v new file mode 100644 index 000000000..2cfc6fbd8 --- /dev/null +++ b/tests/asicworld/code_hdl_models_dlatch_reset.v @@ -0,0 +1,30 @@ +//----------------------------------------------------- +// Design Name : dlatch_reset +// File Name : dlatch_reset.v +// Function : DLATCH async reset +// Coder : Deepak Kumar Tala +//----------------------------------------------------- +module dlatch_reset ( +data , // Data Input +en , // LatchInput +reset , // Reset input +q // Q output +); +//-----------Input Ports--------------- +input data, en, reset ; + +//-----------Output Ports--------------- +output q; + +//------------Internal Variables-------- +reg q; + +//-------------Code Starts Here--------- +always @ ( en or reset or data) +if (~reset) begin + q <= 1'b0; +end else if (en) begin + q <= data; +end + +endmodule //End Of Module dlatch_reset -- cgit v1.2.3