Altera Forum






Threads: 18,921
Posts: 77,325
Members: 29,164
Welcome to our newest member, rbn
User
Reputation
9135
7620
5891
4150
2930
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > General > General Altera Discussion

verilog module output to NULL

Reply
 
Thread Tools Display Modes
  #1  
Old February 9th, 2010, 09:05 AM
sonaj sonaj is offline
Altera Beginner
 
Join Date: Jan 2010
Posts: 4
Rep Power: 241
sonaj is on a distinguished road
Default verilog module output to NULL

I created a complex module.
Not all output using all the time.
How can I redirect the unused outputs too "null".

sample:

uart_rx rx1 (.reset(uart_rst),
.rxclk(baud_clk),
.rx_read(rs),
.rx_data(data),
.rx_in(rx),
.rx_empty( to null),
.rx_busy(to null)
Reply With Quote
  #2  
Old February 9th, 2010, 11:38 PM
jakobjones jakobjones is offline
Altera Guru
 
Join Date: Aug 2007
Location: Salt Lake City, Utah
Posts: 1,644
Rep Power: 5754
jakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a gurujakobjones is a guru
Default Re: verilog module output to NULL

Strictly speaking, if you don't want to use a port on a module, just don't connect it to anything. The synthesis tool is smart enough to remove any logic driving the ports.

Examples:
Code:
uart_rx rx1 (
    .reset(uart_rst),
    .rxclk      (baud_clk   ),
    .rx_read    (rs         ),
    .rx_data    (data       ),
    .rx_in      (rx         ),
    .rx_empty   (           ),
    .rx_busy    (           )
);
or

Code:
uart_rx rx1 (
    .reset(uart_rst),
    .rxclk      (baud_clk   ),
    .rx_read    (rs         ),
    .rx_data    (data       ),
    .rx_in      (rx         )  
);
Alternatively, you can use a macro to get rid of it:
Code:
uart_rx rx1 (
    .reset(uart_rst),
    .rxclk      (baud_clk   ),
    .rx_read    (rs         ),
    .rx_data    (data       ),
    .rx_in      (rx         )
`ifndef USE_WORTHLESS_PORTS
    ,
    .rx_empty   (           ),
    .rx_busy    (           )
`endif
);
And you can use synthesis directives if you don't want it in there for synthesis but do for simulation:
Code:
uart_rx rx1 (
    .reset(uart_rst),
    .rxclk      (baud_clk   ),
    .rx_read    (rs         ),
    .rx_data    (data       ),
    .rx_in      (rx         )
    // synthesis translate_off
    ,
    .rx_empty   (           ),
    .rx_busy    (           )
    // synthesis translate_on
);
Jake
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion from output to input base of VHDL module New2VHDL FPGA, Hardcopy, and CPLD Discussion 1 January 13th, 2010 10:20 AM
how to implement a VHDL testbench for verilog module? mayp Quartus II and EDA Tools Discussion 7 June 4th, 2009 03:44 AM
How to define the NULL descriptor in SGDMA draculaor IP Discussion 4 February 16th, 2009 12:55 AM
How to make a NULL FPGA (CycloneII) - a complete empty design cowboy_film_fan FPGA, Hardcopy, and CPLD Discussion 6 June 16th, 2008 03:43 AM
Why can't find timing report of clk output from PLL module? David_Cai Quartus II and EDA Tools Discussion 1 January 2nd, 2008 01:00 AM


All times are GMT -8. The time now is 02:43 PM.