mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 11:25:53 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
30
tests/asicworld/code_hdl_models_dlatch_reset.v
Normal file
30
tests/asicworld/code_hdl_models_dlatch_reset.v
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue