6 out_r_, out_a, out_d_);
9 `input(a_r, a_a, a_a_, [(`DATAWIDTH-1):0], a_d)
10 `input(op_r, op_a, op_a_, [(`DATAWIDTH-1):0], op_d)
11 `output(out_r, out_r_, out_a, [(`DATAWIDTH-1):0], out_d_)
12 `defreg(out_d_, [(`DATAWIDTH-1):0], out_d)
15 reg [(`DATAWIDTH-1):0] reg_a;
17 reg [(`DATAWIDTH-1):0] reg_op;
19 always @(posedge clk) begin
21 `onread(a_r, a_a) have_a = 1; reg_a = a_d; end
24 `onread(op_r, op_a) have_op = 1; reg_op = op_d; end
27 if (have_a && have_op) begin
32 3: out_d = (reg_a<0) ? (-reg_a) : reg_a;
35 `onwrite(out_r, out_a)