Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

How can i tie an input port of my top module to a fixed value using the tool settings

Hi all,

I have a signal as an input port from the top which will give a reset value to registers at reset.

suppose an example like

if(rst_n==1'b0) begin

x<=a;

else

x<=s;

Now tool is converting this register into a latch and in the timing reports the path consists of a loop. the tool also issues a warning of a combinational loop for this signal.

So i want to tie this signal (a) which is an input port of my system to some value in order to tell the tool that it will have a static value and not a variable one, which the tool is understanding .

So any qsf assignment if known do help me out.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you really need x to be a register, you should use a clock and include your code into a

    always @ (posedge clk) block.

    In the way you are using x here, a combinatorial assignment is enough:

    assign x = (rst_n==1'b0) ? a : s;

    and x should be defined wire instead of reg
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    sorry chris i dint gave complete info...the assignments are in a sequential logic only..i mean the sensitivity list has the clock...sorry for the confusion