Here is a sample solutions to Assignment 0: 16-bit Absolute Value.
// 1-bit Half Adder module ha(s, co, a, b); output s, co; input a, b; xor summer(s, a, b); and (co, a, b); endmodule // 16-bit Negate module neg(b, a); parameter BITS = 16; output [BITS-1:0] b; input [BITS-1:0] a; wire [BITS-1:0] c; ha g(b[0], c[0], 1, ~a[0]); genvar i; for (i=1; i
The C program that generated this page was written by Hank Dietz using the CGIC library to implement the CGI interface.
Advanced Computer Architecture.