Author Topic: I'm going to try FPGA for the first time - question  (Read 15748 times)

0 Members and 1 Guest are viewing this topic.

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2185
Re: I'm going to try FPGA for the first time - question
« Reply #50 on: July 29, 2016, 03:59:24 pm »
I think MultiSIM is the simulator.  I don't know how to get the logic diagrams in Quartus but see if Tools -> RTL Viewer works.  Or try Google...  I am fairly certain that the feature exists.

I agree that MultiSIM is the simualtor - I saw that mentioned a few times, just don't know how to get it to load.

The Tools -> RTL Viewer WORKS though - thank you!
 

Offline spudboy488

  • Regular Contributor
  • *
  • Posts: 136
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: I'm going to try FPGA for the first time - question
« Reply #52 on: July 29, 2016, 05:49:44 pm »
I think MultiSIM is the simulator.  I don't know how to get the logic diagrams in Quartus but see if Tools -> RTL Viewer works.  Or try Google...  I am fairly certain that the feature exists.

I agree that MultiSIM is the simualtor - I saw that mentioned a few times, just don't know how to get it to load.

The Tools -> RTL Viewer WORKS though - thank you!

In the past, the simulator wasn't included in the free software.  That's why I have never used one - I didn't have it!  With Vivado, I do.  But I still haven't come to grips with using it.

ETA:  If you get one of those books that starts out with simple logic circuits and works up, it is very helpful to look at the schematic.  Just so you know what is actually being created...
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: I'm going to try FPGA for the first time - question
« Reply #53 on: July 29, 2016, 06:12:31 pm »
ETA:  If you get one of those books that starts out with simple logic circuits and works up, it is very helpful to look at the schematic.  Just so you know what is actually being created...
One of the good things to know is that a caveat of HDLs is that it's easy to create unwanted latches - so the first thing to look for in the schematic is that you don't see any flip-flops in places where you don't explicitly want some!
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2185
Re: I'm going to try FPGA for the first time - question
« Reply #54 on: July 29, 2016, 06:28:54 pm »
In the past, the simulator wasn't included in the free software.

Maybe that is why I can't run it - I am using the free web edition...
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: I'm going to try FPGA for the first time - question
« Reply #55 on: July 30, 2016, 01:31:49 am »
In the past, the simulator wasn't included in the free software.

Maybe that is why I can't run it - I am using the free web edition...

Google around about it.  It wasn't included with the free Xilinx WebPack ISE.  Happily (maybe) it is included with the free version of Vivado.
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2185
Re: I'm going to try FPGA for the first time - question
« Reply #56 on: July 30, 2016, 02:19:22 am »
I'm feeling pretty good tonight about accomplishing something!  I was able to get Grant's awesome CP/M example up and running on the board I ordered and finally today after getting an SD (not SDHC!) memory card, I got it working, formatted with his tool, and running CP/M great.

Just to see if I could - I got out my Saleae and starting tracing what the VHDL for the SD card controller was doing and began to try to tweak it for SDHC operation.  This page was invaluable as was looking at his initialization code in C:

http://elm-chan.org/docs/mmc/mmc_e.html

Once I implemented the CMD8 and modified the result part of the VHDL to process the extra 4 bytes it returned, I got the initialization sequence to work.  After that it was just changing the addressing from byte to LBA and the SDHC now also works!

My next plan will be to attempt to make a single VHDL that detects which type SD/SDHC and deals with each appropriately...

Thanks for all the good information and help in this thread!
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4525
  • Country: au
    • send complaints here
Re: I'm going to try FPGA for the first time - question
« Reply #57 on: July 30, 2016, 02:31:09 am »
In the past, the simulator wasn't included in the free software.

Maybe that is why I can't run it - I am using the free web edition...

Google around about it.  It wasn't included with the free Xilinx WebPack ISE.  Happily (maybe) it is included with the free version of Vivado.
Xilinx ISE has included a simulator for a long time, they switched from a bundled modelsim package to their iSim clone around 2010?? Its not great but it works and the price is right (free).
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: I'm going to try FPGA for the first time - question
« Reply #58 on: July 30, 2016, 04:45:05 pm »
I'm feeling pretty good tonight about accomplishing something!  I was able to get Grant's awesome CP/M example up and running on the board I ordered and finally today after getting an SD (not SDHC!) memory card, I got it working, formatted with his tool, and running CP/M great.

Just to see if I could - I got out my Saleae and starting tracing what the VHDL for the SD card controller was doing and began to try to tweak it for SDHC operation.  This page was invaluable as was looking at his initialization code in C:

http://elm-chan.org/docs/mmc/mmc_e.html

Once I implemented the CMD8 and modified the result part of the VHDL to process the extra 4 bytes it returned, I got the initialization sequence to work.  After that it was just changing the addressing from byte to LBA and the SDHC now also works!

My next plan will be to attempt to make a single VHDL that detects which type SD/SDHC and deals with each appropriately...

Thanks for all the good information and help in this thread!

How about a link for the Grant project?  I'd like to see what it entails.

About 12 years ago, I used the Opencores T80 core (Z80) to implement CP/M.  I used a compact flash device to implement the full complement of maximum sized disks.  I actually started out to use the T80 to implement PacMan but got sidetracked.  Later on, I got PacMan running on another board but, alas, we don't have room for a table style video game.  Maybe now that we have moved to a bigger place...

I also implemented an IBM 1130 computer, still using the compact flash device because it has a simple parallel interface (and it's fast!).  I have had it running for several years now.
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: I'm going to try FPGA for the first time - question
« Reply #59 on: July 30, 2016, 04:55:29 pm »
First post of this topic...
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: I'm going to try FPGA for the first time - question
« Reply #60 on: July 30, 2016, 05:54:34 pm »
As an alternative to modelsim in quartus (there's a free version, but can be a pain to set up) you can use quartus simulator for waveforms that allows relatively straight forward stimulus of inputs - clock, high, low, arbitrary value for buses etc..

Just create a new 'University program VWF' file, add the nodes you want to see and any inputs can be edited for states, transitions, clocks, then 'simulation -> run functional simulation'.  Be sure to change the setting in simulation >options to 'Quartus II simulator'.  I've been using that and its pretty quick and handy for fairly basic tasks.  For qsys stuff I tend to use signaltap II to probe the bus and signals to/from peripherals.  It's the only way I could get acustom master to read from the SDRAM controller - by looking at how the NIOS II did it.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: I'm going to try FPGA for the first time - question
« Reply #61 on: August 01, 2016, 07:41:58 am »



Just to see if I could - I got out my Saleae and starting tracing what the VHDL for the SD card controller was doing and began to try to tweak it for SDHC operation.  This page was invaluable as was looking at his initialization code in C:

http://elm-chan.org/docs/mmc/mmc_e.html

Once I implemented the CMD8 and modified the result part of the VHDL to process the extra 4 bytes it returned, I got the initialization sequence to work.  After that it was just changing the addressing from byte to LBA and the SDHC now also works!

Alan could you upload a "diff file" for the SDHC part ?

/Bingo
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2185
Re: I'm going to try FPGA for the first time - question
« Reply #62 on: August 01, 2016, 12:12:15 pm »
Bingo, I'm working on a removable system right now for it.  I can PM you the SDHC fixed disk version, or if you want to wait a couple of days, I'll have a 4 drive version where you can mount a virtual diskette in any drive.  The virtual diskette can be up to your size in the SD card - for example - my 4GB card has 470 virtual 8MB diskettes.  I've created a mount utility to manage mounting diskettes and it even has a way to mount by name using a file with number,name mappings:

I'm hoping to try my hand at modifying where the OS loads to and can move it up making another 3K of program space next.

Code: [Select]
A>mount
Diskette Mount Tool 1.00.
 
Drive A: contains diskette 0 (SYSTEM).
Drive B: contains diskette 1 (PASCAL).
Drive C: contains diskette 2 (BDS_C).
Drive D: contains diskette 3.

So you could use:

MOUNT B: PASCAL
or
MOUNT C: WORDSTAR
or
MOUNT D: 200

Thanks,

Alan
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 238
  • Country: gb
  • Do Not Boil
Re: I'm going to try FPGA for the first time - question
« Reply #63 on: August 01, 2016, 12:16:22 pm »
Back to the OPs' original Q; All this FPGA getting started talk whetted my appetite, so with three weeks vacation coming up I've finally taken the plunge...some thirty years after playing with GALs in University and thinking they were pretty cool.  A poke around eBay led me to this, which is in the UK;

http://www.ebay.co.uk/itm/Altera-Cyclone-IV-FPGA-Learning-Board-EP4CE6E22C8N-and-USB-Blaster-Programmer-/121897534832

...there are cheaper sources for it in China, but it'll come quicker from up the road.  Any comments on it? Be nice, I already clicked Buy Now. I realise the uncommitted I/O is limited, but 8 bit VGA, some LEDs, switches, a buzzer and some other bits will be well above my competence level for quite some time I should think.

DAVE
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: I'm going to try FPGA for the first time - question
« Reply #64 on: August 01, 2016, 01:31:01 pm »
That board should have everything you need to get started.  Hopefully it'll come with a disk with example projects on it, and pin assignment files so you won't have to manually assign the pins for the memory.  I actually have that board in my watch list.

The only downsides I see are the lack of external IO - thats not much of a problem except when you start to have lots of interfaces, and the medium gate count.  The EP4CE6 is the smallest device in the cyclone IV family, with ~6700 LE's, 270kbits of embedded memory (thats actually more than enough for most applications).   If you're planning on using alteras microcontroller design, it will eat into the LE's quite a bit, but should still leave enough for custom applications - 6000 LE's is a LOT of logic, especially if you use the embedded dedicated memory blocks for large shift registers and FIFO's, then each LE will be used for actual logic.

https://www.altera.com/en_US/pdfs/literature/hb/cyclone-iv/cyiv-51001.pdf

I'm not sure I would use the VGA port, but a VGA controller is an excellent starter project (still working on mine!).   All in all its rather basic, but *far* better than a bare board with just regulators and a programmer - some buttons and LED's even just a few are always handy for test outputs and just seeing 'whats happening' - something you really need to learn more complex HDL.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: I'm going to try FPGA for the first time - question
« Reply #65 on: August 01, 2016, 02:40:43 pm »
Bingo, I'm working on a removable system right now for it.  I can PM you the SDHC fixed disk version, or if you want to wait a couple of days, I'll have a 4 drive version where you can mount a virtual diskette in any drive. 

Alan i'll just wait  (thanx)   :-+

/Bingo
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 238
  • Country: gb
  • Do Not Boil
Re: I'm going to try FPGA for the first time - question
« Reply #66 on: August 01, 2016, 03:01:26 pm »
@Buriedcode; there is a disk that comes with it, and I found some schematics at;

https://svn.mavipet.sk/svn/fpga_tests/HW/ZRtech/

...the PCB layouts seem to match what I can see in the pics.  Only thing I wish it had is a SD card interface, so I guess that's where some of that uncommitted I/O will be going.   The VGA port was indeed my idea for a starter project...we'll see how that goes!

Regards

DAVE
 

Offline mac.6

  • Regular Contributor
  • *
  • Posts: 225
  • Country: fr
Re: I'm going to try FPGA for the first time - question
« Reply #67 on: August 01, 2016, 08:54:29 pm »
A while ago someone posted a video of Nvidia's labs. They indeed had a hardware emulator, which apparently consisted of... a room full of racks full of high-density FPGAs, with a PCIe card sticking out at the end that is plugged into the test PC :D

I didn't saw the GPU hardware labs while I was at Nvidia, but I worked on Tegra 4i fpga, it was a very big PCB with 8 (up to 10) big virtex (5 and 6 mixed) on it. It was running quite fast compared to Cadence dedicated simulators. The only drawback with this kind of fpga is that they are not always 100% timing accurate.
 
The following users thanked this post: Kilrah

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2185
Re: I'm going to try FPGA for the first time - question
« Reply #68 on: August 02, 2016, 03:07:49 pm »
What do files with .cmp and/or .qip accomplish?

I can compile the VHDL without them and I don't get any errors.

example cmp:

Code: [Select]
component CGABoldRom
PORT
(
address : IN STD_LOGIC_VECTOR (10 DOWNTO 0);
clock : IN STD_LOGIC  := '1';
q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
);
end component;

example qip:

Code: [Select]
set_global_assignment -name IP_TOOL_NAME "ROM: 1-PORT"
set_global_assignment -name IP_TOOL_VERSION "13.0"
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "CGABoldRom.vhd"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "CGABoldRom.cmp"]

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf