Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

xilinx warnings XST 1306 and XST 646

Status
Not open for further replies.

bitu_tzp

Newbie level 4
Joined
Sep 4, 2016
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
125
I am trying to understand SPI protocols. So i tried to model a SPI master device. But whien i synthesize i get warnings like
1. Xst:1306 - Output <rcx_buffer> is never assigned.
2. Xst:646 - Signal <rcx_buff<0>> is assigned but never used. This unconnected signal will be trimmed during the optimization process.

my code is:


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module master(inp,pin,rst,miso,sck,mosi,trans_buff,send_buff,rcx_buffer);
input sck,rst,miso,pin;
input [7:0] inp;
output mosi;
output [7:0] trans_buff,send_buff;
output [7:0] rcx_buffer;
 
reg mosi;
reg [7:0] trans_buff;      // buffer for storing the byte to send
reg [7:0] send_buff;      // buffer for the byte to be send
reg [7:0] rcx_buff=8'b00000000;     // buffer for storing the byte received
 
 
always @(posedge sck)
begin   
    if(rst)
    begin
        trans_buff=8'b00000000;
        send_buff=8'b00000000;
    end
    else 
        begin
    if(pin)
        trans_buff=inp;      //capturing the input
    else
    begin
        send_buff[0]=trans_buff[7];     //copy msb of trans_buff in send_buff
        mosi=send_buff[7];              //send msb first
        send_buff=send_buff<<1;    // left shift for next bit to send
        trans_buff=trans_buff<<1;
    end
       end
end
 
always @(negedge sck)
begin
    rcx_buff[0]=miso;         //capture serial input in negedge of sck
    rcx_buff=rcx_buff<<1;
end
endmodul

 
Last edited by a moderator:

If you check where output rcx_buffer is assigned in your code, you don't find any place. May be you confused rcx_buffer and rcx_buff?

Generally, it's bad coding style to use blocking assigments in sequential always blocks. Suggest to rewrite the code with non-blocking assignments and then start to fix the errors.
 

    V

    Points: 2
    Helpful Answer Positive Rating
I am trying to understand SPI protocols. So i tried to model a SPI master device. But whien i synthesize i get warnings like
1. Xst:1306 - Output <rcx_buffer> is never assigned.
2. Xst:646 - Signal <rcx_buff<0>> is assigned but never used. This unconnected signal will be trimmed during the optimization process.

my code is:


Code Verilog - [expand]
1
2
3
4
5
send_buff[0]=trans_buff[7];     //copy msb of trans_buff in send_buff
        mosi=send_buff[7];              //send msb first
        send_buff=send_buff<<1;    // left shift for next bit to send
        trans_buff=trans_buff<<1;
    end

I'm pretty certain this code will behave differently after synthesis than it does in simulation due to the use of blocking statements. You are treatiing this sequence like a progaramming task in C. Verilog is a hardware description language. If you want the correct flip-flop behavior assign each bit of the flip-flops with a single statement instead of multiple sequences of statements.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top