Searching \ for '[EE] Nexys 2' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=nexys
Search entire site for: 'Nexys 2'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Nexys 2'
2011\04\20@211709 by V G

picon face
Just got my Nexys 2 board (500K gates)!

This thing is awesome. I don't even know where to start. Downloaded the
reference manual from the Digilent website, also downloading Xilinx ISE web
pack at the moment.

Any ideas on what to work on first? I have NO idea where to start or what to
do.

I turned the device on, and a cool demo circuit loaded up off the 16MB
flash. Buttons and switches are all function. I connected the device to the
computer and used the Adept software to communicate with the board.
Everything seems to be working. Now I want to create a simple "circuit" and
load it up on the board. The reference manual doesn't have any notes on the
addresses of buttons or anything. Is there more documentation for this
anywhere

2011\04\21@012805 by Xiaofan Chen

face picon face
On Thu, Apr 21, 2011 at 9:16 AM, V G <spam_OUTx.solarwind.xTakeThisOuTspamgmail.com> wrote:
> Just got my Nexys 2 board (500K gates)!
>
> This thing is awesome. I don't even know where to start. Downloaded the
> reference manual from the Digilent website, also downloading Xilinx ISE web
> pack at the moment.
>
> Any ideas on what to work on first? I have NO idea where to start or what to
> do.
>
> I turned the device on, and a cool demo circuit loaded up off the 16MB
> flash. Buttons and switches are all function. I connected the device to the
> computer and used the Adept software to communicate with the board.
> Everything seems to be working. Now I want to create a simple "circuit" and
> load it up on the board. The reference manual doesn't have any notes on the
> addresses of buttons or anything. Is there more documentation for this
> anywhere?

The tutorial here may help.
http://ece.wpi.edu/~rjduck/ece3810.htm
http://ece.wpi.edu/~rjduck/ece574.htm

The schematics should give you the information you want.
http://www.digilentinc.com/Data/Products/NEXYS2/Nexys2_sch.pdf

-- Xiaofa

2011\04\21@012858 by Oli Glaser

flavicon
face
On 21/04/2011 02:16, V G wrote:
> Any ideas on what to work on first? I have NO idea where to start or what to
> do.

Start right at the beginning - get up to speed with the IDE and simulation software, this will likely take quite a bit of time. Simulate and confirm the circuit first, before and after routing (after routing is important as you may have done something in Verilog that cannot be synthesised)
There is probably some graphic designer if it's anything like the Actel IDE - resist the temptation to start chucking random cores together and creating some masterpiece :-) Obviously you won't be able to for long, but as with most of these types of thing you need to know (at least roughly) how things are working at a lower level.
I would begin with something like a simple counter (I assume there are some leds on the board to flash) or adder, or even just an and gate (wire inputs to 2 of the buttons, output to led when you press both the led turns on)

> I turned the device on, and a cool demo circuit loaded up off the 16MB
> flash. Buttons and switches are all function. I connected the device to the
> computer and used the Adept software to communicate with the board.
> Everything seems to be working. Now I want to create a simple "circuit" and
> load it up on the board. The reference manual doesn't have any notes on the
> addresses of buttons or anything. Is there more documentation for this
> anywhere?

There should be a schematic of the board somewhere, and the devices datasheet will have the pin addresses. There will be info on how to declare the "wiring" of your circuit to the pins in Verilog, or you can probably add your new module to the graphic designer and connect it's outputs graphically. Check the Xilinx site, download any info that looks relevant, and spend a few hours reading.
Is there no "getting started" tutorial that comes with the board?
Sure someone will have better info on how the Xilinx IDE works in detail, I have no experience of it.

2011\04\21@014529 by V G

picon face
On Thu, Apr 21, 2011 at 1:28 AM, Oli Glaser <.....oli.glaserKILLspamspam@spam@talktalk.net> wrote:

{Quote hidden}

This is extremely frustrating. I've googled for an hour and can't find ANY
Verilog example projects for this board. I can't get ANYTHING to compile. I
just want to blink an LED. I DON'T want to start off with VHDL but all the
examples I found were VHDL.

I found the schematic for the board, but it is not useful until I can get a
very simple configuration working.

All I want to do right now is blink an LED, or light up an LED when a button
is pressed, but I have no idea how. I learn best by examples.

Help, anyone!?!?!??!?!!!

AAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRGHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!

2011\04\21@014600 by V G

picon face
On Thu, Apr 21, 2011 at 1:28 AM, Xiaofan Chen <xiaofancspamKILLspamgmail.com> wrote:

>  The tutorial here may help.
> http://ece.wpi.edu/~rjduck/ece3810.htm
> http://ece.wpi.edu/~rjduck/ece574.htm
>
> The schematics should give you the information you want.
> http://www.digilentinc.com/Data/Products/NEXYS2/Nexys2_sch.pdf
>


I found those two sites, but all examples were much too complicated and were
written in VHDL

2011\04\21@021550 by Xiaofan Chen

face picon face
On Thu, Apr 21, 2011 at 1:45 PM, V G <.....x.solarwind.xKILLspamspam.....gmail.com> wrote:
> On Thu, Apr 21, 2011 at 1:28 AM, Xiaofan Chen <EraseMExiaofancspam_OUTspamTakeThisOuTgmail.com> wrote:
>
>>  The tutorial here may help.
>> http://ece.wpi.edu/~rjduck/ece3810.htm
>> http://ece.wpi.edu/~rjduck/ece574.htm
>>
>> The schematics should give you the information you want.
>> http://www.digilentinc.com/Data/Products/NEXYS2/Nexys2_sch.pdf
>
> I found those two sites, but all examples were much too complicated and were
> written in VHDL.

One of the tutorial is written in Verilog.
http://ece.wpi.edu/~rjduck/Counter%20Tutorial%20Verilog.pdf

> All I want to do right now is blink an LED, or light up an LED when a button
> is pressed, but I have no idea how. I learn best by examples.
>
Anyway, the following is the exactly what you want. I am not
familiar with VHDL/Verilog/CPLD/FPGA stuff but I can at least
understand what the turtorial is trying to do.
http://www.digilentinc.com/Data/Documents/Tutorials/Xilinx%20ISE%20WebPACK%20Verilog%20Tutorial.pdf

This file may help as well.
http://www.lbebooks.com/downloads/nexys2.ucf


-- Xiaofan

2011\04\21@022146 by Oli Glaser

flavicon
face
On 21/04/2011 06:45, V G wrote:
> This is extremely frustrating. I've googled for an hour and can't find ANY
> Verilog example projects for this board. I can't get ANYTHING to compile. I
> just want to blink an LED. I DON'T want to start off with VHDL but all the
> examples I found were VHDL.
>

There is a lot less out there in general for FPGAs. You may be best off getting the book that goes with the board if your budget allows for it.

> I found the schematic for the board, but it is not useful until I can get a
> very simple configuration working.

Without some step by step, board/chip specific tutorial, you will have to get reading all the available documentation. This will be necessary anyway.
I'm sure most have been in this situation - I know I spent many many hours reading long datasheets, and there is still so much I don't know overall. These things are very complicated - although the principle is simple the application of it, software, theory, is not. I remember spending about a day getting an LED counter going, in one sense it helped to make my own board as at least I knew for sure there was nothing out there :-)

> All I want to do right now is blink an LED, or light up an LED when a button
> is pressed, but I have no idea how. I learn best by examples.

I learn quickest by example, but I learn best when I figure it all out myself (plus it's more satisfying)
Just poke it till it works, it will do...

> Help, anyone!?!?!??!?!!!
>
> AAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRGHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!

2011\04\21@022456 by Oli Glaser

flavicon
face
On 21/04/2011 07:15, Xiaofan Chen wrote:
> Anyway, the following is the exactly what you want. I am not
> familiar with VHDL/Verilog/CPLD/FPGA stuff but I can at least
> understand what the turtorial is trying to do.
> http://www.digilentinc.com/Data/Documents/Tutorials/Xilinx%20ISE%20WebPACK%20Verilog%20Tutorial.pdf

That looks pretty good at a glance.
I would probably start working through that, looks quite nicely laid out and not too long/complex.

2011\04\21@030006 by RussellMc

face picon face
> This is extremely frustrating. I've googled for an hour and can't find ANY
> Verilog example projects for this board. I can't get ANYTHING to compile. I
> just want to blink an LED. I DON'T want to start off with VHDL but all the
> examples I found were VHDL.

> Help, anyone!?!?!??!?!!!

Mr Gargoyle, when asked:

     "nexys 2" verilog "hello world"

says (4th hit from here) that this seems [tm] to be exactly what you want:

He says:

Nexys 2 ...  My aim in this post is to take a complete newbie through
the steps of getting a “hello world” program to run on the hardware.
So from the beginning… to make some output happen for some input
(light an LED when a button is pressed). The language I will be using
for this tutorial is Verilog ...


           http://www.beatbutchermpc.com/category/projects/

Report ...

This may be useful in due course;

     http://wn.com/Nexys2_FPGA_board


        Russell

2011\04\21@030046 by V G

picon face
I somehow managed to write a Verilog program and get it running on the
board, no thanks to the poorly written tutorials. Everything seems to be
working fine, except for a dimly lit segment on each of the displays, which
I also noticed with the test design. I emailed them about it. Hopefully,
I'll get a free board

2011\04\21@030218 by Xiaofan Chen

face picon face
On Thu, Apr 21, 2011 at 2:21 PM, Oli Glaser <oli.glaserspamspam_OUTtalktalk.net> wrote:
>
> There is a lot less out there in general for FPGAs. You may be best off
> getting the book that goes with the board if your budget allows for it.
>

Like this one?
http://www.lbebooks.com/booksandkits-HWDesign.htm


-- Xiaofa

2011\04\21@031216 by Michael Watterson

face picon face
On 21/04/2011 06:45, V G wrote:
> On Thu, Apr 21, 2011 at 1:28 AM, Xiaofan Chen<@spam@xiaofancKILLspamspamgmail.com>  wrote:
>
>>   The tutorial here may help.
>> http://ece.wpi.edu/~rjduck/ece3810.htm
>> http://ece.wpi.edu/~rjduck/ece574.htm
>>
>> The schematics should give you the information you want.
>> www.digilentinc.com/Data/Products/NEXYS2/Nexys2_sch.pdf
>>
>
> I found those two sites, but all examples were much too complicated and were
> written in VHDL.

Do a few SIMPLE tutorials in VHDL, not Verilog.
Then switch to verilog

There are no "addresses" The various devices are just connected to pins read or driven by gates. Pretend you never ever heard of CPUs and you have only ever built logic circuits.

2011\04\21@031402 by Oli Glaser

flavicon
face
On 21/04/2011 08:02, Xiaofan Chen wrote:
> On Thu, Apr 21, 2011 at 2:21 PM, Oli Glaser<KILLspamoli.glaserKILLspamspamtalktalk.net>  wrote:
>> There is a lot less out there in general for FPGAs. You may be best off
>> getting the book that goes with the board if your budget allows for it.
>>
> Like this one?
> http://www.lbebooks.com/booksandkits-HWDesign.htm
>
>

Yep, exactly like that one.
There was also two mentioned on the page VG purchased his Nexus 2 from, here is one:
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,729,744&Prod=LBE-IDD <http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,729,744&Prod=LBE-IDD>

2011\04\21@031413 by V G

picon face
On Thu, Apr 21, 2011 at 2:59 AM, RussellMc <RemoveMEapptechnzTakeThisOuTspamgmail.com> wrote:

{Quote hidden}

Also found this during searching. But it turns out that my problem was a
different one.

Anyway, I managed to get it to work as expected. Now off to the fun world of
FPGAs. This stuff looks cool

2011\04\21@031558 by Michael Watterson

face picon face
On 21/04/2011 06:45, V G wrote:
> I DON'T want to start off with VHDL but all the
> examples I found were VHDL.

Verilog might be better for projects but for initial tutorial to grasp this is NOT a programmed CPU, VHDL is better.

Do a week of VHDL and then switch to Verilog

2011\04\21@032123 by V G

picon face
On Thu, Apr 21, 2011 at 3:14 AM, Michael Watterson <spamBeGonemikespamBeGonespamradioway.org>wrote:

> Verilog might be better for projects but for initial tutorial to grasp
> this is NOT a programmed CPU, VHDL is better.
>
> Do a week of VHDL and then switch to Verilog.
>
>

I totally understand that this is not a CPU. I already started doing Verilog
now. Got some neat stuff running on the board, that I've written myself. It
would be counterproductive to switch to VHDL now

2011\04\21@032304 by V G

picon face
On Thu, Apr 21, 2011 at 3:13 AM, Oli Glaser <TakeThisOuToli.glaserEraseMEspamspam_OUTtalktalk.net> wrote:

>  Yep, exactly like that one.
> There was also two mentioned on the page VG purchased his Nexus 2 from,
> here is one:
>
> www.digilentinc.com/Products/Detail.cfm?NavPath=2,729,744&Prod=LBE-IDD
> <
> www.digilentinc.com/Products/Detail.cfm?NavPath=2,729,744&Prod=LBE-IDD
> >
>
>
I wish I could get those, but they're not in my budget right now -
especially with the Ontario government being a bitch about student loans,
and my work term with the university ending

2011\04\21@034628 by Michael Watterson

face picon face
On 21/04/2011 08:21, V G wrote:
> I totally understand that this is not a CPU. I already started doing Verilog
> now. Got some neat stuff running on the board, that I've written myself. It
> would be counterproductive to switch to VHDL now.

You only think that. A week of VHDL would really help your verilog.

I found this the case.

I also found that learning different programming languages makes my C programming better.

Some like Occam, Oberon, Lisp, Ada, Prolog I have done very little.
Others like Pascal, Modula-2, C++, Java and C#  I have done lot

2011\04\21@075318 by Martin Darwin

flavicon
face

On Apr 21, 2011, at 3:45 AM, Michael Watterson <RemoveMEmikespamTakeThisOuTradioway.org> wrote:

> On 21/04/2011 08:21, V G wrote:
>> I totally understand that this is not a CPU. I already started doing Verilog
>> now. Got some neat stuff running on the board, that I've written myself. It
>> would be counterproductive to switch to VHDL now.
>
> You only think that. A week of VHDL would really help your verilog.
>
I would agree. If you plan on doing verilog be sure to read some of mr. Cummings papers. There is one that goes through some of the common gotchas ( verilog has some nice ones!)

http://www.sunburst-design.com/papers/

M

2011\04\21@075618 by Olin Lathrop

face picon face
V G wrote:
> I learn best by examples.

Now we're getting at the root of the problem.

Complex things can't be learned by example.  You may think you learn best by
example, but that's only your desire for instant gratification getting in
the way.

Grow up and get over it.  Sit down, and read the docs.  It may take a couple
of days before you touch anything else.  This is something where you have to
truly *understand* what's going on and have the options in the back of your
mind at every step.  Monkey-see monkey-do examples won't show you all the
choices that were made or what else could have been done.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\04\21@085428 by Michael Watterson

face picon face
On 21/04/2011 12:56, Olin Lathrop wrote:
> V G wrote:
>> >  I learn best by examples.
> Now we're getting at the root of the problem.
>
> Complex things can't be learned by example.  You may think you learn best by
> example, but that's only your desire for instant gratification getting in
> the way.
>
> Grow up and get over it.  Sit down, and read the docs.  It may take a couple
> of days before you touch anything else.  This is something where you have to
> truly*understand*  what's going on and have the options in the back of your
> mind at every step.  Monkey-see monkey-do examples won't show you all the
> choices that were made or what else could have been done.

I'd not word it the same,
but I 100% agree with the point that is being made.

FPGA is really HW design. Like acres of 74xx series chips. But using a specification language rather than schematics to document the design.

In fact if it's simple, or you are mad, or you very very expert with the FPGA architecture and HW design, you CAN enter the FPGA specification as a "real" schematic. You can view an "equivalent" schematic of any VHDL or Verilog specification with the Xilinx tools.

Use slow original 74 series or 4000 series or else a good simulator, so you can "see" the issues.
The Hardware Description/Specification Languages look deceptively simple, especially Verilog for a C programmer.

In fact if you have not done HW logic recently or at all, bread board some 74xNN type designs with
a) Asynchronous logic, such as D-type ripple counter with 4 stages (/2, /4 /8 /16)
b) Synchronous logic, maybe start with a JK counter with a single clock to all flip flops. (synchronous /2, /4 /8/16)

Connect 4 input NAND to four stages of each of  above designs to detect "all 1s". (a) and (b) give quite different results.

put an inverter on the nand gate and compare the primary clock transitions with edges on the output of inverter. Feed both signals to a 2 i/p nand driving a D-type flip flop.

Are D-Types "always" bad? Take 3 x D-Type flip flops:
Drive a D-Type as /2 and drive a pair, one from Q and one from !Q outputs both as /2  ( Clock goes to clock, D connects to !Q)
Now compare Q2 and Q3 outputs.

Having done all these on a Logic Simulator or real breadboard with a Logic analyser,  now do these designs in VHDL and Verilog.

The Xilinx tools includes a logic simulator/tester. You can feed the clock and see the output waveforms as per the 4000/7400 series breadboard or simulation, all without download to FPGA.

Finally download each to FPGA using Pin Definition tool to define the input pin and all the output pins for the logic analyser.
If you want you can in both the real logic bread board connect LEDs to all the Q and !Q pins (via buffer such as ULN2003 etc) and use 1Hz clock (you want Logic Analyser and 1MHz clock for 4000 series, 10MHz 7400 series and 100MHz on FPGA to see the issue with example (a) and verify the the results).

These are very trivial examples, but illustrate a few of points.
1) Synchronous vs async random logic issues
2) Race conditions
3) Sometimes asynchronous logic is fine.
4) Ultimately verilog and VHDL are not programming languages, but an alternate to schematics to specify hardware. The idea is to hide the actual implementation such that the same design should usually work on different FPGAs and even on ASIC, providing you are understanding what you do.

Of course if doing DSP, knowing how much RAM (for samples, coefficients, taps) and how many "real" HW  multiplier / accumulators exist is important to know. But this is in same sense that you can design a logic circuit and it might not work at all on 4000 series logic or 74HC logic but needs a faster family, or the design might work on ANY logic family as it's less than 1MHz.

2011\04\21@094842 by alan.b.pearce

face picon face
> In fact if it's simple, or you are mad, or you very very expert with the
> FPGA architecture and HW design, you CAN enter the FPGA specification as
> a "real" schematic. You can view an "equivalent" schematic of any VHDL
> or Verilog specification with the Xilinx tools.

Colleagues who are much better at these things than me tell me that entering the 'code' as a schematic doesn't tend to allow some of the niftier features to be used. The 'schematic' function is there to allow import of very simple things, and export for functional checking.

This is not to say that doing things this way shouldn't be done while getting up to speed.


-- Scanned by iCritical.

2011\04\21@110531 by Herbert Graf

picon face
On Thu, 2011-04-21 at 03:00 -0400, V G wrote:
> I somehow managed to write a Verilog program and get it running on the
> board, no thanks to the poorly written tutorials. Everything seems to be
> working fine, except for a dimly lit segment on each of the displays, which
> I also noticed with the test design. I emailed them about it. Hopefully,
> I'll get a free board.

You won't. By default some FPGAs enable week pull ups on their IOs, it's
an option during configuration, I'd bet that's what you're seeing.

TTYL

2011\04\21@111355 by Herbert Graf

picon face
On Thu, 2011-04-21 at 01:45 -0400, V G wrote:
> This is extremely frustrating. I've googled for an hour and can't find ANY
> Verilog example projects for this board. I can't get ANYTHING to compile. I
> just want to blink an LED. I DON'T want to start off with VHDL but all the
> examples I found were VHDL.
>
> I found the schematic for the board, but it is not useful until I can get a
> very simple configuration working.
>
> All I want to do right now is blink an LED, or light up an LED when a button
> is pressed, but I have no idea how. I learn best by examples.
>
> Help, anyone!?!?!??!?!!!
>
> AAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRGHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!

Try this:



/* Blinks LED when button is pressed, assumes LED is active high and
BUTTON is active high */
/* make sure you set your pin constraints to match whatever pins CLK,
BUTTON and LED are on. */


module blinkLED (input CLK, input BUTTON, output LED);


/* change to whatever is necessary to make the LED blink at a human
rate. For example, if your clock is 20MHz, and you want the LED to blick
once per second, set your counter to reset at 10million. */

`define MAXCOUNT 32'd10000000

reg [32:0] counter;
reg int_LED;

always @ (posedge CLK)
begin
       if (counter >= MAXCOUNT)
       begin
               counter <= 0;
               int_LED <= !int_LED;
       end
       else
       begin
               counter <= counter + 1;
               int_LED <= int_LED;
       end
end

always @ (posedge CLK)
begin
       if (BUTTON)
       begin
               LED <= int_LED;
       end
       else
       begin
               LED <= 0;
       end
end

endmodule
               

2011\04\21@122700 by Michael Watterson

face picon face
On 21/04/2011 14:47, alan.b.pearceEraseMEspam.....stfc.ac.uk wrote:
> Colleagues who are much better at these things than me tell me that entering the 'code' as a schematic doesn't tend to allow some of the niftier features to be used. The 'schematic' function is there to allow import of very simple things, and export for functional checking.
>

Agreed 100

2011\04\21@131037 by V G

picon face
On Thu, Apr 21, 2011 at 11:04 AM, Herbert Graf <EraseMEhkgrafspamgmail.com> wrote:

>  You won't. By default some FPGAs enable week pull ups on their IOs, it's
> an option during configuration, I'd bet that's what you're seeing.
>

You may be onto something. But even the preloaded demo program faces this
problem. But I did notice that by NOT configuring any of the segment LEDs
for use resulted in all of them glowing dimly jut like that one segment. So
what I think it is, is a mis-configured pin map for that segment

2011\04\21@131855 by Herbert Graf

picon face
On Thu, 2011-04-21 at 13:10 -0400, V G wrote:
> On Thu, Apr 21, 2011 at 11:04 AM, Herbert Graf <RemoveMEhkgrafEraseMEspamEraseMEgmail.com> wrote:
>
> >  You won't. By default some FPGAs enable week pull ups on their IOs, it's
> > an option during configuration, I'd bet that's what you're seeing.
> >
>
> You may be onto something. But even the preloaded demo program faces this
> problem.
That's right. It's not something in the bitstream, it's something you
have to tell impact about.

I don't know exactly where you'd find it offhand, but it's somewhere in
the programming options.

This is a guess on my part, I'm not familiar with your board, but I've
seen it happen on many boards and the designers rarely pick up on it.

TTYL

2011\04\21@140753 by V G

picon face
On Thursday, April 21, 2011, Herbert Graf <RemoveMEhkgrafspam_OUTspamKILLspamgmail.com> wrote:
{Quote hidden}

>

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...