Author Topic: project on FPGA  (Read 5230 times)

0 Members and 1 Guest are viewing this topic.

Offline sagnikbasuTopic starter

  • Contributor
  • Posts: 19
  • Country: in
project on FPGA
« on: January 26, 2017, 01:40:22 pm »
Is there any guide where I can learn how to implement a 8 bit micro controller architecture in FPGA ?
 

Offline chris_leyson

  • Super Contributor
  • ***
  • Posts: 1541
  • Country: wales
Re: project on FPGA
« Reply #1 on: January 26, 2017, 01:42:28 pm »
Xilinx PicoBlaze is a good place to start.
 

Offline sagnikbasuTopic starter

  • Contributor
  • Posts: 19
  • Country: in
Re: project on FPGA
« Reply #2 on: January 26, 2017, 02:09:18 pm »
PicoBlaze is fine....Is there any guide where I can learn to design my own micro-controller in FPGA using HDL ?
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: project on FPGA
« Reply #3 on: January 26, 2017, 02:34:04 pm »
Is there any guide where I can learn how to implement a 8 bit micro controller architecture in FPGA ?

I have a book about that, for sale, on ebay  :)
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: project on FPGA
« Reply #4 on: January 26, 2017, 04:21:51 pm »
I am amazed that people are still interested in this... Unless you are a student and targeting to do design work in the future.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6182
  • Country: ro
Re: project on FPGA
« Reply #5 on: January 26, 2017, 05:11:44 pm »
Just in case you need some examples https://opencores.org/projects

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: project on FPGA
« Reply #6 on: January 26, 2017, 05:18:27 pm »
I am amazed that people are still interested in this... Unless you are a student and targeting to do design work in the future.

There are certainly a lot of developed cores available on OpenCores or from the FPGA manufacturers.  There are also a lot of individual projects that are well documented.  Notably the T80 core (Z80) which makes a wonderful core for Arcade Games like PacMan.  Or running CP/M on a smokin' processor.

Here's another reason:  Suppose when you were a young fellow back around '70, you had unlimited access to an IBM 1130 computer complete with drum plotter and, incidentally, you had a copy of the Electronic Circuit Analysis Program (ECAP) all the time you were in EE school?  Pretty cool!  I loved that machine...  Bode' plots were pretty straightforward:  Use ECAP to produce the AC analysis and stuff the results into a custom plotting program.  We even had log-log paper!

So, I built one in an FPGA that clocks at 125x and runs ALL of the original software, unmodified.  I still code in FORTRAN on both the 1130 and the PC.

I have a LOT of books on CPU design, that was my major in grad school.  I ate that stuff for breakfast!  Alas, that was a long time ago...

Of the books, one of the most interesting is "Microprocessor Design Using Verilog HDL" by Monte Dalrymple.  The author takes a unique approach to defining the various states and decoding of instructions by using Excel spreadsheets.  Lots of spreadsheets!  It's truly elegant.  The design revolves around the Z80.

https://www.amazon.com/Microprocessor-Design-Using-Verilog-HDL/dp/0963013351

There are a number of good books re: Verilog.  I use VHDL so I really don't want to get into recommending something I haven't read.

Another interesting book "The Elements of Computing Systems" by Nisan and Schocken starts with the basic NAND gate and works up to a complete operating system.  The only 'givens' are a 2 input NAND gate and an Inverter, now design a complete CPU including memory (program and data).  This won't be an elegant CPU and the instruction set is truly minimal but, after a bit of work, you will have a working CPU even if it is software.  At that point you transition to a provided CPU emulation and work on writing an assembler (the provided emulation is much faster than interpreting a barn full of logic at each step).  Once the assembler is complete, you write a compiler for a stack type language (the CPU is stack oriented) complete with all the issues of heap, stack and frames followed by writing an OS.  I have gotten as far as completing the assembler.  Yes, a few people have implemented the CPU on an FPGA.  FWIW: Microsoft Visual Studio Community Edition C# works well for writing the assembler and it's free!

https://www.amazon.com/Elements-Computing-Systems-Building-Principles/dp/0262640686/ref=mt_paperback

« Last Edit: January 26, 2017, 05:33:30 pm by rstofer »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: project on FPGA
« Reply #7 on: January 26, 2017, 07:57:24 pm »
Much can be learned by designing and implementing your own processor, it's one of my goals to do some day. For the time being I'm using existing CPU softcores in my FPGA projects. I've got a number of arcade games running, and several retro computers, even one that runs CP/M on a $14 FPGA board.
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: project on FPGA
« Reply #8 on: January 26, 2017, 08:14:50 pm »
I'm using existing CPU softcores in my FPGA projects.

This is where I was going to... When I had myself a task to do something, then I only worked on it. Mostly ethernet and video broadcasting stuff, but surely I did not write my own CPU when there was one just there for free.
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: project on FPGA
« Reply #9 on: January 27, 2017, 10:16:19 am »
I am currently studying CPU Architecture. Perhaps my YouTube Playlist will help you (start at the end).
https://www.youtube.com/playlist?list=PLSJAmtVQiOk9uYQQByxMrO3eKN4LYeWEG

I am first studying the theory and with that getting new ideas for my CPU design for which I take notes in a design document. My idea is somewhat non-mainstream so I have to filter and sift through the typical material.

Also wikipedia has many articles on different types of CPU architecture that can shed light on the basics architecture styles/types.

Good luck.
[2c]
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7725
  • Country: ca
Re: project on FPGA
« Reply #10 on: January 27, 2017, 10:09:34 pm »
Take a look at Opencores.org.   Look under microcontrolers. 
http://opencores.org/

If i remember correctly, you should find Verilog & VHDL examples of full mcu like PICs, arm and others, as well as custom microcontrolers with compilers.

You can also find all the parts to the processors, like ALU units, MMU units, DSPs, ect...
« Last Edit: January 28, 2017, 12:02:21 am by BrianHG »
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: project on FPGA
« Reply #11 on: January 28, 2017, 09:28:12 am »
I am amazed that people are still interested in this... Unless you are a student and targeting to do design work in the future.
i am amazed that people still do new z80 home computer boards
though, i understand why they may do it.
and if (when) i will start with FPGA at some point i will try an implement an mcu on it >:D
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: project on FPGA
« Reply #12 on: January 28, 2017, 07:21:13 pm »
Why is it amazing that people build systems around old chips? People still spin yarn out of wool, still make butter out of cream by hand, people do all sorts of things that are technically obsolete. Modern computers are extremely complex and it can help tremendously in understanding them to take a step back to simpler times and gain an understanding of the ancestors of modern computers. You probably couldn't reasonably build a Pentium system on a breadboard but a Z80 or 6502 computer is feasible.
« Last Edit: January 28, 2017, 07:23:02 pm by james_s »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: project on FPGA
« Reply #13 on: January 28, 2017, 09:34:52 pm »
I am amazed that people are still interested in this... Unless you are a student and targeting to do design work in the future.
i am amazed that people still do new z80 home computer boards
though, i understand why they may do it.
and if (when) i will start with FPGA at some point i will try an implement an mcu on it >:D

The 8080 based Altair 8800 ran at 2 MHz and the later Z80 systems ran at the blistering speed of 6 MHz.  Today you can buy a Z80 chip that runs at 50 MHz and you can probably build one that runs at 100 MHz.  Then add in an operating system like CP/M with a Compact Flash to implement all 16 logical drives and you have a pretty nice machine with a command line user interface.  In fact, it smokes!

I still have all of the CP/M related software including PL/I and FORTRAN.  I primarily use the Macro Assembler and WordStar as an editor.  Anything but 'ed'...  Were I truly interested, I might try to resurrect UCSD Pascal and see how it would run on a 50 MHz board.  It would be awesome!

I bought one of the Zilog 50 MHz boards, added an identical sized daughter card with two USB ports for the console, reader and printer and a Compact Flash socket.  This is a very nice system.

These retro computers are a lot of fun.   To build them, you need decent hardware skills to design and build the interfaces (if you use a manufactured board), solid coding skills to write the BIOS and boot loader and, if you are creating the core, very solid FPGA skills.  These are NOT Arduino projects!

Or, you can use the advanced hardware features of the modern Z80 chip to build a robot, running the 'bot under CP/M and writing the code in Microsoft FORTRAN!  That's about as retro as it gets!  If you do the core on an FPGA, you can add all the PWM ports you want.  Wheel encoders are trivial.

Once again, I'm going to mention "Microprocessor Design Using Verilog HDL" because the fellow who wrote it worked for Zilog on advanced Z80 chips.  Write your own Z80 or copy the T80 core from OpenCores and see how far you can get.
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: project on FPGA
« Reply #14 on: January 29, 2017, 01:21:09 am »
[...]
duh!

can't people recognize sarcasm?

Quote
Once again, I'm going to mention "Microprocessor Design Using Verilog HDL" because the fellow who wrote it worked for Zilog on advanced Z80 chips.  Write your own Z80 or copy the T80 core from OpenCores and see how far you can get.
thanks for mentioning it, i always forget the name of dat book. (not sarcasm. i really want to buy it, sooner or later)
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: project on FPGA
« Reply #15 on: January 29, 2017, 10:54:13 am »
I have this book for sale on ebay.
 

Offline John_ITIC

  • Frequent Contributor
  • **
  • Posts: 510
  • Country: us
  • ITIC Protocol Analyzers
    • International Test Instruments Corporation
Re: project on FPGA
« Reply #16 on: January 29, 2017, 07:15:15 pm »
Is there any guide where I can learn how to implement a 8 bit micro controller architecture in FPGA ?

Yes, take a look at this PIC IP Core I designed years back. It comes with full Verilog HDL and detailed PDF documentation but without support (no time for that): http://summitsoftconsulting.com/Pic10IpCore.htm

Also, many college-level books use CPU cores as example projects. Check amazon.com
Pocket-Sized USB 2.0 LS/FS/HS Protocol Analyzer Model 1480A with OTG decoding.
Pocket-sized PCI Express 1.1 Protocol Analyzer Model 2500A. 2.5 Gbps with x1, x2 and x4 lane widths.
https://www.internationaltestinstruments.com
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf