Latency(CLK) | 1 |
module s1(iData, iVld, iStall, oData, oVld, oStall, reset, clk);
parameter W = 32;
input [W-1:0] iData;
input iVld;
output iStall;
output [W-1:0] oData;
output oVld;
input oStall;
input reset;
input clk;
reg [W-1:0] oData;
reg oVld;
always @(posedge clk)
if (!iStall)
oData <= #1 xxxFunc(iData);
always @(posedge clk)
if (reset)
oVld <= #1 1'b0;
else if (!iStall)
oVld <= #1 iVld;
assign iStall = oStall;
function [W-1:0] xxxFunc;
input [W-1:0] data;
xxxFunc = data;
endfunction
endmodule
|