J
Jerry Johns
Guest
I have a problem with the following Forward unit design in my RISC CPU.
It synthesizes fine, but Xilinx is unable to find the right clock
signal to optimize on
-----------------------------------+------------------------+-------+
Clock Signal | Clock buffer(FF name) | Load |
-----------------------------------+------------------------+-------+
clk | BUFGP | 1 |
N166(_n0012<2>277:O) | NONE(*)(stallc) | 1 |
-----------------------------------+------------------------+-------+
(*) This 1 clock signal(s) are generated by combinatorial logic,
and XST is not able to identify which are the primary clock signals.
Please use the CLOCK_SIGNAL constraint to specify the clock signal(s)
generated by combinatorial logic.
INFO:Xst:2169 - HDL ADVISOR - Some clock signals were not automatically
buffered by XST with BUFG/BUFR resources. Please use the buffer_type
constraint in order
How do i correct this and tell it to point to clk as the one to display
clk info on?
Here's my CODE:
-------------------------------------------------------------------------------------------------------------------------------------
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 22:27:26 08/17/06
// Design Name:
// Module Name: fwdunit
// Project Name:
// Target Device:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module fwdunit(
clk,
rst,
dec_op1, //op1 from decoder
dec_op2, //op2 from decoder
dec_op3, //op3 (during Stores)
ex_op2, //op2 from EX unit
load_exop, //ack that EXE unit has a LDD operation to op2
destination
force_wbop2, //force fwd unit to use WB results as base for ALU (NOTE
if STALL sig is used for other reasons than forwarding, then this is
not pertinent)
wb_op2,
gpr_d1,
gpr_d2,
gpr_d3,
ex_d2,
wb_d2,
d1,
d2,
d3,
stall
);
input clk;
input rst;
input [4:0] dec_op1;
input [4:0] dec_op2;
input [4:0] dec_op3;
input force_wbop2;
input [4:0] ex_op2;
input [4:0] wb_op2;
input load_exop;
input [7:0] gpr_d1;
input [7:0] gpr_d2;
input [7:0] gpr_d3;
input [7:0] ex_d2;
input [7:0] wb_d2;
output [7:0] d1;
wire [7:0] d1w;
output [7:0] d2;
output [7:0] d3;
output stall;
wire comp1, comp2, comp3, comp4;
reg stallc;
reg stall2c;
assign d1w = (dec_op1==ex_op2) ? ex_d2 : (dec_op1==wb_op2) ? wb_d2 :
gpr_d1;
assign d1 = (force_wbop2) ? wb_d2 : d1w;
assign d2 = (dec_op2==ex_op2) ? ex_d2 : (dec_op2==wb_op2) ? wb_d2 :
gpr_d2;
assign d3 = (dec_op3==ex_op2) ? ex_d2 : (dec_op3==wb_op2) ? wb_d2 :
gpr_d3;
assign stall = stallc & stall2c;
//synthesis attribute clock_signal of clk is true;
//synthesis attribute clock_signal of load_exop is false;
always @ (load_exop) begin
if (load_exop == 1'b1) begin
if ((dec_op1 == ex_op2) & (load_exop))
stallc <= 1;
end
else begin
stallc <= 0;
end
end
always @ (posedge clk) begin
if (rst) begin
stall2c <= 1'b1;
end
if (stallc == 1'b1)
stall2c <= 1'b0;
else
stall2c <= 1'b1;
end
endmodule
It synthesizes fine, but Xilinx is unable to find the right clock
signal to optimize on
-----------------------------------+------------------------+-------+
Clock Signal | Clock buffer(FF name) | Load |
-----------------------------------+------------------------+-------+
clk | BUFGP | 1 |
N166(_n0012<2>277:O) | NONE(*)(stallc) | 1 |
-----------------------------------+------------------------+-------+
(*) This 1 clock signal(s) are generated by combinatorial logic,
and XST is not able to identify which are the primary clock signals.
Please use the CLOCK_SIGNAL constraint to specify the clock signal(s)
generated by combinatorial logic.
INFO:Xst:2169 - HDL ADVISOR - Some clock signals were not automatically
buffered by XST with BUFG/BUFR resources. Please use the buffer_type
constraint in order
How do i correct this and tell it to point to clk as the one to display
clk info on?
Here's my CODE:
-------------------------------------------------------------------------------------------------------------------------------------
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 22:27:26 08/17/06
// Design Name:
// Module Name: fwdunit
// Project Name:
// Target Device:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module fwdunit(
clk,
rst,
dec_op1, //op1 from decoder
dec_op2, //op2 from decoder
dec_op3, //op3 (during Stores)
ex_op2, //op2 from EX unit
load_exop, //ack that EXE unit has a LDD operation to op2
destination
force_wbop2, //force fwd unit to use WB results as base for ALU (NOTE
if STALL sig is used for other reasons than forwarding, then this is
not pertinent)
wb_op2,
gpr_d1,
gpr_d2,
gpr_d3,
ex_d2,
wb_d2,
d1,
d2,
d3,
stall
);
input clk;
input rst;
input [4:0] dec_op1;
input [4:0] dec_op2;
input [4:0] dec_op3;
input force_wbop2;
input [4:0] ex_op2;
input [4:0] wb_op2;
input load_exop;
input [7:0] gpr_d1;
input [7:0] gpr_d2;
input [7:0] gpr_d3;
input [7:0] ex_d2;
input [7:0] wb_d2;
output [7:0] d1;
wire [7:0] d1w;
output [7:0] d2;
output [7:0] d3;
output stall;
wire comp1, comp2, comp3, comp4;
reg stallc;
reg stall2c;
assign d1w = (dec_op1==ex_op2) ? ex_d2 : (dec_op1==wb_op2) ? wb_d2 :
gpr_d1;
assign d1 = (force_wbop2) ? wb_d2 : d1w;
assign d2 = (dec_op2==ex_op2) ? ex_d2 : (dec_op2==wb_op2) ? wb_d2 :
gpr_d2;
assign d3 = (dec_op3==ex_op2) ? ex_d2 : (dec_op3==wb_op2) ? wb_d2 :
gpr_d3;
assign stall = stallc & stall2c;
//synthesis attribute clock_signal of clk is true;
//synthesis attribute clock_signal of load_exop is false;
always @ (load_exop) begin
if (load_exop == 1'b1) begin
if ((dec_op1 == ex_op2) & (load_exop))
stallc <= 1;
end
else begin
stallc <= 0;
end
end
always @ (posedge clk) begin
if (rst) begin
stall2c <= 1'b1;
end
if (stallc == 1'b1)
stall2c <= 1'b0;
else
stall2c <= 1'b1;
end
endmodule