data/full_repos/permissive/219219909/Complex_Multiplier/shifter_1.v
data/verilator_xmls/a8ceffbb-b19f-4eb9-ba72-909fc37c256a.xml
module barrelshifter_1(
    input [23:0] Z,
	 input [7:0] ZE,
	 input [4:0] c,
	 input E,AS,BS,
    output reg [23:0] ZN,
	 output reg [7:0] ZEN
    );
	 parameter N=3'b0;
always @(Z,AS,BS,ZE,c,E) begin
if ((AS==0 && BS==1) || (AS==1 && BS==0)) begin
if (E==0) begin
ZN<=Z<<c;
ZEN<=ZE-{N,c};
end
else begin
ZN<=Z<<c;
ZEN<=ZE-{N,c};
end
end
else begin
if (E==1) begin
ZN<=Z>>1;
ZN[23]<=E;
ZEN<=ZE+8'b1;
end
else begin
ZN<=Z;
ZEN<=ZE;
end
end
end
endmodule
module barrelshifter_1(
    input [23:0] Z,
	 input [7:0] ZE,
	 input [4:0] c,
	 input E,AS,BS,
    output reg [23:0] ZN,
	 output reg [7:0] ZEN
    );

	 parameter N=3'b0;
always @(Z,AS,BS,ZE,c,E) begin
if ((AS==0 && BS==1) || (AS==1 && BS==0)) begin
if (E==0) begin
ZN<=Z<<c;
ZEN<=ZE-{N,c};
end
else begin
ZN<=Z<<c;
ZEN<=ZE-{N,c};
end
end
else begin
if (E==1) begin
ZN<=Z>>1;
ZN[23]<=E;
ZEN<=ZE+8'b1;
end
else begin
ZN<=Z;
ZEN<=ZE;
end
end
end
endmodule