mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
24
tests/asicworld/code_verilog_tutorial_addbit.v
Normal file
24
tests/asicworld/code_verilog_tutorial_addbit.v
Normal file
|
@ -0,0 +1,24 @@
|
|||
module addbit (
|
||||
a , // first input
|
||||
b , // Second input
|
||||
ci , // Carry input
|
||||
sum , // sum output
|
||||
co // carry output
|
||||
);
|
||||
//Input declaration
|
||||
input a;
|
||||
input b;
|
||||
input ci;
|
||||
//Ouput declaration
|
||||
output sum;
|
||||
output co;
|
||||
//Port Data types
|
||||
wire a;
|
||||
wire b;
|
||||
wire ci;
|
||||
wire sum;
|
||||
wire co;
|
||||
//Code starts here
|
||||
assign {co,sum} = a + b + ci;
|
||||
|
||||
endmodule // End of Module addbit
|
Loading…
Add table
Add a link
Reference in a new issue