Design of Binary To Excess3 Code Converter using Conditional Operator (Data Flow Modeling Style)-
Output Waveform : Binary to Excess3 Code Converter |
Verilog CODE-
//-----------------------------------------------------------------------------
//
// Title : Binary_to_Excess3
// Design : verilog upload
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : Binary to Excess3 Code Converter using Conditional Operator.v
module Binary_to_Excess3 ( din , dout );
output [3:0] dout ;
input [3:0] din ;
assign dout = (din==0) ? 3 :
(din==1) ? 4 :
(din==2) ? 5 :
(din==3) ? 6 :
(din==4) ? 7 :
(din==5) ? 8 :
(din==6) ? 9 :
(din==7) ? 10 :
(din==8) ? 11 :
(din==9) ? 12 :
4'bZZZZ ;
endmodule
0 comments :
Post a Comment