mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-30 02:32:53 +08:00
19fa611bb9
- adding more chip code - pushing memory stuff into common - making common "oh_" naming class -
22 lines
293 B
Verilog
22 lines
293 B
Verilog
//CSA3:2 Compressor
|
|
module oh_csa32 (/*AUTOARG*/
|
|
// Outputs
|
|
c, s,
|
|
// Inputs
|
|
in0, in1, in2
|
|
);
|
|
|
|
input in0;
|
|
input in1;
|
|
input in2;
|
|
|
|
output c;
|
|
output s;
|
|
|
|
assign s = in0 ^ in1 ^ in2;
|
|
assign c = (in0 & in1) | ( in1 & in2) | ( in2 & in0 );
|
|
|
|
endmodule // oh_csa32
|
|
|
|
|