I am working on a an assignment where I have to synthesize my Verilog code. I wrote the code and compiled and simulated, and everything worked fine. When I went to synthesize, the design compiler gave me an error in one of my modules. This module represents a simple 8-bit shift register with a data buffer. When I synthesize, it gives me an error:
continuous assignment output buffer must be a net
I don't know what this message is stating.
module shiftReg(output shift_out,
output reg [7:0] data_buff,
input shift_write, clk, shift_in,
input [7:0] data);
reg [7:0] buffer;
assign shift_out = buffer[7];
assign buffer[0] = shift_in; //This is where it states an error.
always@(posedge clk) begin
if(shift_write == 1) begin
buffer <= {buffer[6:0],shift_in};
end
end
always@(shift_write) begin
if(shift_write == 0) begin
data_buff <= buffer;
buffer <= data;
end
end
endmodule