FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-15-2007, 06:43 AM
Mark McDougall
Guest
 
Posts: n/a
Default pullup on array of wires?

I have an array of wires...

ie. wire [31:0] foo;

Is there an easy way to 'pullup' the entire array?

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
Reply With Quote
  #2 (permalink)  
Old 06-15-2007, 08:08 AM
Jonathan Bromley
Guest
 
Posts: n/a
Default Re: pullup on array of wires?

On Fri, 15 Jun 2007 15:43:07 +1000, Mark McDougall <[email protected]>
wrote:

>I have an array of wires...
>
>ie. wire [31:0] foo;


Not truly an array of wires, but rather a 32-bit vector...

>Is there an easy way to 'pullup' the entire array?


assign (pull1, pull0) foo = -1;

You could, I suppose, generate an array of pullup
primitives, but the assign is way easier.

No promises about whether this would work in synthesis -
depends on your tool, and of course it's likely that the
appropriate device resources exist only on I/O pads.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
[email protected]
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
Reply With Quote
  #3 (permalink)  
Old 06-15-2007, 06:02 PM
Guest
 
Posts: n/a
Default Re: pullup on array of wires?


Mark McDougall wrote:
> I have an array of wires...
>
> ie. wire [31:0] foo;
>
> Is there an easy way to 'pullup' the entire array?


Jonathan's approach works, but I don't know whether a synthesis tool
will handle it correctly.

His alternate suggestion of an array of pullup instances would look
like

pullup p[31:0](foo);

Or you could just change the net from a wire to a tri1, a net type
that has an implicit pullup.

Reply With Quote
  #4 (permalink)  
Old 06-15-2007, 06:19 PM
Jonathan Bromley
Guest
 
Posts: n/a
Default Re: pullup on array of wires?

On Fri, 15 Jun 2007 10:02:02 -0700, [email protected] wrote:

> an array of pullup instances would look like
>
>pullup p[31:0](foo);


<blush> I had completely forgotten that it's legal to
create an instance array of primitives, just as it is
for modules. I had also completely forgotten about tri1...

>Or you could just change the net from a wire to a tri1, a net type
>that has an implicit pullup.


Hmmm. Secrets of the Gate-level Modelling Masters. I suspect
that the pullup() primitive, and tri1, are at least as likely
to give synthesis a hard time as my continuous assign.

What never fails to astonish me, though, is how useful this
obscure[*] gate/switch-level Verilog stuff can be when
you're doing board-level models. Pullups, "tranif" primitives
to model metal-to-metal switches and jumper links, module path
delays, trireg, timing checks - they all have their uses in
board-level modelling.
[*] Obscure to me. Yes, I know it's at the core of
Verilog's heritage. But I'm an RTL guy at heart :-)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
[email protected]
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
Reply With Quote
  #5 (permalink)  
Old 06-15-2007, 10:15 PM
Kevin Neilson
Guest
 
Posts: n/a
Default Re: pullup on array of wires?

[email protected] wrote:
> Mark McDougall wrote:
>> I have an array of wires...
>>
>> ie. wire [31:0] foo;
>>
>> Is there an easy way to 'pullup' the entire array?

>
> Jonathan's approach works, but I don't know whether a synthesis tool
> will handle it correctly.
>
> His alternate suggestion of an array of pullup instances would look
> like
>
> pullup p[31:0](foo);
>
> Or you could just change the net from a wire to a tri1, a net type
> that has an implicit pullup.
>


I like to use tri1, but it won't work for synthesis--at least not with
the FPGA tools I use. In that case, you have to instantiate the PULLUP
primitive for each bit. I'm not sure why the tri1 can't be recognized.
In FPGAs, the only place pullups may be used is usually only in the IOB.
Reply With Quote
  #6 (permalink)  
Old 06-18-2007, 01:38 AM
Mark McDougall
Guest
 
Posts: n/a
Default Re: pullup on array of wires?

[email protected] wrote:
> Mark McDougall wrote:


>> ie. wire [31:0] foo;
>> Is there an easy way to 'pullup' the entire array?

>
> Jonathan's approach works, but I don't know whether a synthesis tool
> will handle it correctly.
>
> His alternate suggestion of an array of pullup instances would look
> like
> pullup p[31:0](foo);


OK, thanks for the suggestions guys! I'm more familiar with VHDL but our
testbench is written in Verilog - BTW this is purely for simulation, no
synthesis required...

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find wires optimized away by synthesis in netlist [email protected] Verilog 0 12-28-2006 07:26 PM
verilog 'pullup' and VHDL Mark McDougall Verilog 5 10-26-2006 03:39 PM
Using contents of one array to index into another array kb33 Verilog 3 10-08-2006 07:12 PM
arrays of wires [email protected] Verilog 1 08-20-2005 05:09 PM
Un used wires Javier Correa Verilog 1 10-20-2003 04:06 AM


All times are GMT +1. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved