M
midasyoo
Guest
I'm not good at coding verilog. i'm novice. i'm using ISE7.1i tool.
Below code is decoder that i made. And i synthesized this code with ISE
7.1i.
But, below error message was happened.
I couldn't understand its meaning. --;
What's the wrong?
Any help, or pointers to good docs would be great!
Thanks in advance,
<<< Synthesize >>>
Started process "Synthesize".
===================================================================
* HDL Compilation
*
===================================================================
Compiling verilog file "decoder.v"
Module <decoder> compiled
No errors in compilation
Analysis of file <"decoder.prj"> succeeded.
===================================================================
* HDL Analysis
*
===================================================================
Analyzing top module <decoder>.
SEL = 1
ERROR:Xst:898 - "decoder.v" line 133: The reset or set test condition
for <DecodeOutput> is incompatible with the event declaration in the
sensitivity list.
Set property "resynthesize = true" for unit <decoder>.
Found 1 error(s). Aborting synthesis.
-->
Total memory usage is 82580 kilobytes
Number of errors : 1 ( 0 filtered)
Number of warnings : 0 ( 0 filtered)
Number of infos : 0 ( 0 filtered)
ERROR: XST failed
Process "Synthesize" did not complete.
Compiling verilog file "decoder.v"
<<< Code >>>
`timescale 1ns / 1ps
module decoder(
//Clock
Clk,
// Reset
RstN,
// Enable
EnN,
// Input
AddrInput,
// Output
DecodeOutput,
//LedInput
LedInput,
//LedOutput
LedOutput
);
/////////////////////////////
// Port Declaration
input Clk;
input RstN;
input EnN;
input [1:0] AddrInput;
output [3:0] LedInput;
output [3:0] LedOutput;
output [3:0] DecodeOutput;
reg [3:0] DecodeOutput;
parameter SEL = 1;
wire EnN;
wire d0, d1, d2, d3;
wire Over;
assign invEnN = ~EnN;
/////////////////////////////
// Port Assign
assign d0 = (SEL == (~AddrInput[1] & ~AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d1 = (SEL == (~AddrInput[1] & AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d2 = (SEL == ( AddrInput[1] & ~AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d3 = (SEL == ( AddrInput[1] & AddrInput[0])) ? 1'b1 : 1'b0 ;
/////////////////////////////
// Decoding Block
always @ (posedge Clk or negedge RstN)
begin : decodingEnable
if (RstN == 1'b1)
begin
DecodeOutput <= 0;
end
else
begin
if (invEnN == 1'b1)
begin
if (d0) begin DecodeOutput <= 1;
end
else if (d1) begin DecodeOutput <= 2;
end
else if (d2) begin DecodeOutput <= 4; end
else if (d3) begin DecodeOutput <= 8;
end
else begin DecodeOutput <= 0;
end
end
else
begin
DecodeOutput <= DecodeOutput + 4'b0001; end
end
end
endmodule
Below code is decoder that i made. And i synthesized this code with ISE
7.1i.
But, below error message was happened.
I couldn't understand its meaning. --;
What's the wrong?
Any help, or pointers to good docs would be great!
Thanks in advance,
<<< Synthesize >>>
Started process "Synthesize".
===================================================================
* HDL Compilation
*
===================================================================
Compiling verilog file "decoder.v"
Module <decoder> compiled
No errors in compilation
Analysis of file <"decoder.prj"> succeeded.
===================================================================
* HDL Analysis
*
===================================================================
Analyzing top module <decoder>.
SEL = 1
ERROR:Xst:898 - "decoder.v" line 133: The reset or set test condition
for <DecodeOutput> is incompatible with the event declaration in the
sensitivity list.
Set property "resynthesize = true" for unit <decoder>.
Found 1 error(s). Aborting synthesis.
-->
Total memory usage is 82580 kilobytes
Number of errors : 1 ( 0 filtered)
Number of warnings : 0 ( 0 filtered)
Number of infos : 0 ( 0 filtered)
ERROR: XST failed
Process "Synthesize" did not complete.
Compiling verilog file "decoder.v"
<<< Code >>>
`timescale 1ns / 1ps
module decoder(
//Clock
Clk,
// Reset
RstN,
// Enable
EnN,
// Input
AddrInput,
// Output
DecodeOutput,
//LedInput
LedInput,
//LedOutput
LedOutput
);
/////////////////////////////
// Port Declaration
input Clk;
input RstN;
input EnN;
input [1:0] AddrInput;
output [3:0] LedInput;
output [3:0] LedOutput;
output [3:0] DecodeOutput;
reg [3:0] DecodeOutput;
parameter SEL = 1;
wire EnN;
wire d0, d1, d2, d3;
wire Over;
assign invEnN = ~EnN;
/////////////////////////////
// Port Assign
assign d0 = (SEL == (~AddrInput[1] & ~AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d1 = (SEL == (~AddrInput[1] & AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d2 = (SEL == ( AddrInput[1] & ~AddrInput[0])) ? 1'b1 : 1'b0 ;
assign d3 = (SEL == ( AddrInput[1] & AddrInput[0])) ? 1'b1 : 1'b0 ;
/////////////////////////////
// Decoding Block
always @ (posedge Clk or negedge RstN)
begin : decodingEnable
if (RstN == 1'b1)
begin
DecodeOutput <= 0;
end
else
begin
if (invEnN == 1'b1)
begin
if (d0) begin DecodeOutput <= 1;
end
else if (d1) begin DecodeOutput <= 2;
end
else if (d2) begin DecodeOutput <= 4; end
else if (d3) begin DecodeOutput <= 8;
end
else begin DecodeOutput <= 0;
end
end
else
begin
DecodeOutput <= DecodeOutput + 4'b0001; end
end
end
endmodule