diff options
Diffstat (limited to 'tests/asicworld/code_hdl_models_decoder_using_assign.v')
-rw-r--r-- | tests/asicworld/code_hdl_models_decoder_using_assign.v | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/asicworld/code_hdl_models_decoder_using_assign.v b/tests/asicworld/code_hdl_models_decoder_using_assign.v new file mode 100644 index 00000000..ec0dc95b --- /dev/null +++ b/tests/asicworld/code_hdl_models_decoder_using_assign.v @@ -0,0 +1,20 @@ +//----------------------------------------------------- +// Design Name : decoder_using_assign +// File Name : decoder_using_assign.v +// Function : decoder using assign +// Coder : Deepak Kumar Tala +//----------------------------------------------------- +module decoder_using_assign ( +binary_in , // 4 bit binary input +decoder_out , // 16-bit out +enable // Enable for the decoder +); +input [3:0] binary_in ; +input enable ; +output [15:0] decoder_out ; + +wire [15:0] decoder_out ; + +assign decoder_out = (enable) ? (1 << binary_in) : 16'b0 ; + +endmodule |