We are designing an 8 bit adder in verilog. Code is
module addsub (
input [7:0] dataa,
input [7:0] datab,
input clk,
output reg[8:0] result
);
always@(posedge clk)
begin
result <= dataa + datab;
end
endmodule
Can you give us simple steps to generate cores so that we run this code on SPARTAN 3E board using CHIPSCOPE PRO. We tried to using various forums and videos but could not find the exact steps.
Edit 1 - List of warnings:
Here are warning messages but no error messages.
The warnings are as follows:
WARNING:Xst:2211 - "ipcore_dir/aj_icon_core.v" line 16: Instantiating black box module <aj_icon_core>.
WARNING:Xst:2211 - "ipcore_dir/aj_vio_core.v" line 25: Instantiating black box module <aj_vio_core>.
WARNING:Xst:2211 - "ipcore_dir/aj_ila_core.v" line 36: Instantiating black box module <aj_ila_core>.
WARNING:Xst:1780 - Signal <CONTROL> is never used or assigned. This unconnected signal will be trimmed during the optimization process.
WARNING:Xst:1780 - Signal <CLK> is never used or assigned. This unconnected signal will be trimmed during the optimization process.
WARNING:PhysDesignRules:372 - Gated clock. Clock net CONTROL1<13> is sourced by a combinatorial pin. This is not good design practice. Use the CE pin to control the loading of data into the flip-flop.
WARNING:Route:455 - CLK Net:CONTROL1<13> may have excessive skew because
WARNING:Route:455 - CLK Net:result_3 may have excessive skew because
WARNING:Route:455 - CLK Net:result_6 may have excessive skew because
WARNING:Route:455 - CLK Net:result_4 may have excessive skew because
WARNING:Route:455 - CLK Net:result_7 may have excessive skew because
WARNING:Route:455 - CLK Net:result_8 may have excessive skew because
WARNING:Route:455 - CLK Net:result_1 may have excessive skew because
WARNING:Route:455 - CLK Net:result_0 may have excessive skew because
WARNING:Route:455 - CLK Net:result_5 may have excessive skew because
WARNING:Route:455 - CLK Net:result_2 may have excessive skew because
WARNING:PhysDesignRules:372 - Gated clock. Clock net CONTROL1<13> is sourced by a combinatorial pin. This is not good design practic
Our code is as follows:
`timescale 1ns / 1ps
module addsub (
inout [7:0] dataa,
inout [7:0] datab,
input clk1,
output reg[8:0]result
);
/////////////////ICON////////////////////////////
wire[35:0] CONTROL0;
wire[35:0] CONTROL1;
aj_icon_core YourInstanceName (
.CONTROL0(CONTROL0), // INOUT BUS [35:0]
.CONTROL1(CONTROL1) // INOUT BUS [35:0]
);
//////////////////////VIO//////////////////////////////////////
wire[35:0] CONTROL;
wire CLK;
wire [8:0] SYNC_IN;
wire [15:0] SYNC_OUT;
aj_vio_core vio_core1 (
.CONTROL(CONTROL0), // INOUT BUS [35:0]
.CLK(clk1), // IN
.SYNC_IN(SYNC_IN), // IN BUS [8:0]
.SYNC_OUT(SYNC_OUT) // OUT BUS [15:0]
);
//////////////////////////////////ila///////////////////////
wire [31 : 0] TRIG0;
aj_ila_core ila_core1(
.CONTROL(CONTROL1), // INOUT BUS [35:0]
.CLK(clk1), // IN
.TRIG0(TRIG0) // IN BUS [31:0]
);
assign TRIG0={16'h0000, dataa ,datab}; //
assign dataa= SYNC_OUT[15:8], datab= SYNC_OUT[7:0], SYNC_IN=result;
always@(posedge clk1)
begin
result <= dataa + datab;
end
endmodule