add_sub.v
//-- add_sub.v
//-- Generated by HDLMAKER Rev 5.5.6, Wednesday December 13 2000
//-- Copyright (c) 2000 IKOS Systems, Cupertino, CA
//-- The information contained in this file is confidential and proprietary.
//-- Any reproduction, use or disclosure, in whole or in part, of this
//-- program, including any attempt to obtain a human-readable version of this
//-- program, without the express, prior written consent of IKOS Systems, Cupertino, CA
//-- is strictly prohibited.
//-- Engineer: B. Joshua Rosen
module add_sub(
a,
b,
ce,
clk_2x,
gblreset,
sub,
acc,
y
);
//-- IO Declarations
parameter width = 56;
input [width-1:0] a;
input [width-1:0] b;
input ce;
input gblreset;
input sub;
input clk_2x;
inout [width-1:0] y;
output [width-1:0] acc ;
reg [width-1:0] acc /* synthesis syn_preserve=1 */;
reg sample,nxt_sample;
reg [2:0] enb;
//-- Signal Declarations
assign y = enb[2] ? acc : {112{1'bZ}};
always@(sample or gblreset or sub or a or b) begin
if(gblreset) begin
acc <= 0;
end // if (gblreset)
else begin
if(sample) begin
acc <= sub ? (a - b) : (a + b);
end // if (ce)
end // else: !if(gblreset)
end // always@ (sample or gblreset or sub or a or b)
always@(posedge clk_2x or posedge gblreset) begin
if(gblreset) begin
sample <= 0;
nxt_sample <= 0;
enb <= 0;
end // if (gblreset)
else begin
nxt_sample <= !nxt_sample & ce;
sample <= nxt_sample;
enb <= {enb,ce};
end // else: !if(gblreset)
end // always@ (posedge clk_2x or posedge gblreset)
endmodule
HDLMaker Generated Files
| add_sub.job |
Synopsys script file |