From a8b18bdf643d8c4ffcdbf966286b82120367980a Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sat, 22 Aug 2009 14:24:19 -0700 Subject: [PATCH] fix firing conditions on Alu.ship --- ships/Alu.ship | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ships/Alu.ship b/ships/Alu.ship index ddd3a4e..67effe4 100644 --- a/ships/Alu.ship +++ b/ships/Alu.ship @@ -200,6 +200,14 @@ public void service() { (inOp_d_trunc==12) ? (in1_d ^ in2_d) : 0; + wire firing_condition; + assign firing_condition = + (inOp_d_trunc==0) ? `in1_full : + (inOp_d_trunc==1) ? `in2_full : + (inOp_d_trunc==7) ? `in1_full : + (inOp_d_trunc==8) ? `in2_full : + ((`in1_full) && (`in2_full)); + always @(posedge clk) begin if (rst) begin `reset @@ -211,6 +219,8 @@ public void service() { out_draining <= 0; if (inOp_d_trunc==0) `drain_in1 else if (inOp_d_trunc==1) `drain_in2 + else if (inOp_d_trunc==7) `drain_in1 + else if (inOp_d_trunc==8) `drain_in2 else if (inOp_d_trunc==9 && both_negative) begin `drain_in1 `drain_in2 end else if (inOp_d_trunc==4 && greater) `drain_in1 else if (inOp_d_trunc==5 && greater) `drain_in2 @@ -223,8 +233,8 @@ public void service() { `drain_in2 end end - if (!out_draining && `out_empty && `in1_full && `in2_full && `inOp_full) begin - `fill_out + if (!out_draining && `out_empty && firing_condition && `inOp_full) begin + if (inOp_d_trunc!=7 && inOp_d_trunc!=8) `fill_out out_draining <= 1; end end -- 1.7.10.4