data/full_repos/permissive/46989236/fifo/queue.v
1: b'%Error: data/full_repos/permissive/46989236/fifo/queue.v:12: Cannot find include file: attributes.v\n`include "attributes.v" \n         ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/46989236/fifo,data/full_repos/permissive/46989236/attributes.v\n             data/full_repos/permissive/46989236/fifo,data/full_repos/permissive/46989236/attributes.v.v\n             data/full_repos/permissive/46989236/fifo,data/full_repos/permissive/46989236/attributes.v.sv\n             attributes.v\n             attributes.v.v\n             attributes.v.sv\n             obj_dir/attributes.v\n             obj_dir/attributes.v.v\n             obj_dir/attributes.v.sv\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:3: Define or directive not defined: \'`INSTR_WIDTH\'\ninput [`INSTR_WIDTH-1:0]d_in,\n       ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:4: Define or directive not defined: \'`INSTR_WIDTH\'\noutput reg [`INSTR_WIDTH-1:0]d_out,\n            ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:8: Define or directive not defined: \'`INSTR_WIDTH\'\nreg [`INSTR_WIDTH-1:0] buffer [`QUEUE_DEPTH-1:0];\n     ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:8: Define or directive not defined: \'`QUEUE_DEPTH\'\nreg [`INSTR_WIDTH-1:0] buffer [`QUEUE_DEPTH-1:0];\n                               ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:9: Define or directive not defined: \'`QUEUE_POINTER_WIDTH\'\nreg [`QUEUE_POINTER_WIDTH:0]GET_POINTER;\n     ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:9: syntax error, unexpected \':\', expecting TYPE-IDENTIFIER\nreg [`QUEUE_POINTER_WIDTH:0]GET_POINTER;\n                         ^\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:29: Define or directive not defined: \'`QUEUE_DEPTH\'\nfor(i=3\'d1;i<`QUEUE_DEPTH;i=i+3\'d1)\n             ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:29: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\nfor(i=3\'d1;i<`QUEUE_DEPTH;i=i+3\'d1)\n                         ^\n%Error: data/full_repos/permissive/46989236/fifo/queue.v:29: syntax error, unexpected \')\', expecting \';\'\nfor(i=3\'d1;i<`QUEUE_DEPTH;i=i+3\'d1)\n                                  ^\n%Error: Exiting due to 10 error(s)\n'
module queue(
input put,get,clk,flush,
input [`INSTR_WIDTH-1:0]d_in,
output reg [`INSTR_WIDTH-1:0]d_out,
output reg empty,full
);

reg [`INSTR_WIDTH-1:0] buffer [`QUEUE_DEPTH-1:0];
reg [`QUEUE_POINTER_WIDTH:0]GET_POINTER;
reg i;
initial begin
`include "attributes.v"
end

always @ (flush)
if (flush)
begin
GET_POINTER <= 3'b000;
empty <= 1'b1;
full <= 1'b0;
end


always @ (posedge put or posedge clk)
if (GET_POINTER < 3'b111)
begin
buffer[0] <= d_in;
$display("Put");
for(i=3'd1;i<`QUEUE_DEPTH;i=i+3'd1)
buffer[i] <= buffer[i-3'd1];
GET_POINTER <= GET_POINTER + 3'd1;
empty <= 1'b0;
full <= 1'b0;
end
else
begin
$display("Buffer full");
full = 1'b1;
end

always @ (posedge get)
begin
d_out <= (GET_POINTER >=0)?buffer[GET_POINTER]:12'd0;
GET_POINTER <= (GET_POINTER >0)? GET_POINTER-1:GET_POINTER;
end

endmodule
module queue(
input put,get,clk,flush,
input [`INSTR_WIDTH-1:0]d_in,
output reg [`INSTR_WIDTH-1:0]d_out,
output reg empty,full
);


reg [`INSTR_WIDTH-1:0] buffer [`QUEUE_DEPTH-1:0];
reg [`QUEUE_POINTER_WIDTH:0]GET_POINTER;
reg i;
initial begin
`include "attributes.v"
end

always @ (flush)
if (flush)
begin
GET_POINTER <= 3'b000;
empty <= 1'b1;
full <= 1'b0;
end


always @ (posedge put or posedge clk)
if (GET_POINTER < 3'b111)
begin
buffer[0] <= d_in;
$display("Put");
for(i=3'd1;i<`QUEUE_DEPTH;i=i+3'd1)
buffer[i] <= buffer[i-3'd1];
GET_POINTER <= GET_POINTER + 3'd1;
empty <= 1'b0;
full <= 1'b0;
end
else
begin
$display("Buffer full");
full = 1'b1;
end

always @ (posedge get)
begin
d_out <= (GET_POINTER >=0)?buffer[GET_POINTER]:12'd0;
GET_POINTER <= (GET_POINTER >0)? GET_POINTER-1:GET_POINTER;
end

endmodule