View previous topic :: View next topic |
Author |
Message |
ressas
Joined: 15 Nov 2019 Posts: 135
|
A Special question about "FPGA and 16F877" |
Posted: Sat Aug 15, 2020 12:01 pm |
|
|
A question that has been on my mind for a long time;
Is it possible to design a mcu architecture with FPGA.
For example, can I design the architecture of the 16f877 with an FPGA?
If yes, can I use the chip in the FPGA as the mcu at the end of the project?
And how long will such a project end? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Sat Aug 15, 2020 12:49 pm |
|
|
Yes.
Some years ago, I built a couple of processors using FPGA's. In both cases
the manufacturer was prepared to supply the core logic diagrams for
the chips. One was a (now fairly old) PIC.
However generally, will cost a lot more than the chip itself. Remember a
lot of gates are needed for things like memory..... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sat Aug 15, 2020 3:42 pm |
|
|
As Mr. T. says , yes you can do it however.....
...an upgraded, newer version PIC can be bought for about $2. How many 1,000s of manhours are YOU going to invest in the FPGA-PIC ???
A proper,100% 'clone' will be very, very time consuming and costly !!
Odds are real good even after 2 soild years od 10hr dayze ,YOU still won't have a viable product.
It's a whole lot easier to get a PIC to emulate something, a HUGE task to get an FPGA to mimic a PIC, even a 'simple' 16F877. |
|
|
ressas
Joined: 15 Nov 2019 Posts: 135
|
|
Posted: Sun Aug 16, 2020 10:03 am |
|
|
Thank you for answers.
I dont have "2 soild years od 10hr dayze"
How about for 16f84a. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Aug 16, 2020 10:19 am |
|
|
Anything is possible and the 16F84 is a lot simpler BUT to what end ? Odds are real good you'll not get 100% of it correct...Obvious place to start is 'simple' timing and I/O, of course you'll have to get ICSP working first though....
Then there's the parts cost. I'm betting an FPGA that might emulate the PIC will cost a LOT MORE than a 16F84, so from an 'economic' viewpoint NOT viable.
While it might make an interesting thesis or final project, it's just not economical. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Sun Aug 16, 2020 11:09 am |
|
|
OpenCores has a design for that.
<https://opencores.org/projects/risc16f84> |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Aug 16, 2020 3:00 pm |
|
|
gee, replacing a $5 PIC with a $62 FPGA just doesn't seem cost effective AND you have to program it. Then there's the PCB design to make it 'pin compatible'. I quickly scanned the article and unless you started with it, I still think 1-2 man years , to get an FPGA to emulate the PIC.
BTW seems the 16F84 is 'not recommended for new designs'...
..sigh, I'm old , I remember when they came out and said 'goodby' to my EPROM eraser...
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Aug 17, 2020 1:45 am |
|
|
FPGA's, and particularly ASIC's, have plummeted in cost recently, so if you
need one, and want to capabilities of a PIC, it may be worth going this route.
However given the price of newer larger PIC's, and the sheer amount of
work involved in writing a replacement for one of these, I'd honestly say
much easier to use the PIC, and a smaller FPGA.... |
|
|
ressas
Joined: 15 Nov 2019 Posts: 135
|
|
Posted: Tue Aug 18, 2020 10:51 pm |
|
|
Actually i don't want a chip that i will use in the industry.
What I want is to learn the details of FPGA and an MCU.
So the price of FPGA I will buy once is not that important.
Instead of making an MCU with FPGA, I'd love to hear if you have any other project suggestions that will learn both.
If not, I think I could devote 4 hours a day and 1 year to this job. (16f84a) |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Tue Aug 18, 2020 10:59 pm |
|
|
Then buy one of the starter kits.
I do a lot of design on Xilinx FPGAs. They have fun-kits.
Like maybe a Spartan 6 series if you want a Soft-Core CPU (like the microblaze) or the Series 7 like a Zynq-010 board (which has hard-core ARM CPUs built into the glass).
I've also been to workshops for Altera (now owned by Intel) and their FPGAs are fun.
Same thing here.. there are kits where you can choose free [spam] CPUs or hardCore CPUs (typically ARM) on the die.
I know Microchip has FPGAs now... but I've not played with them at all yet. I was busy in XilinxLand at the time.
Microchip is on my list to review.
So many toys, so little time.
Oh - and buy a book on Verilog. :D (or VHDL if you like).
FPGAs are a lot of fun.
As someone already mentioned, OpenCores.Org is fun to browse too. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Wed Aug 19, 2020 2:52 am |
|
|
A complete PIC, even a very small one, is a hell of a big project.
You need to start with much smaller pieces. Binary adder, shift register,
memory cell, etc. etc.. The individual bits a thousand or more of which
would be needed to make even the most basic processor.
I built my first processor exactly that way, using discrete logic (before
microprocessors existed).
It's worth understanding just how complex even a small PIC really is.
You are probably looking about 30000 transistors..... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Aug 19, 2020 5:03 am |
|
|
re: ...You are probably looking about 30000 transistors.....
find ( buy ??) a PIC16C84, then you CAN see what's 'under the hood', or in this case, the quartz window .
I actually have some Microchip PLA that I need to 'blast' to make a HD interface between my TRS80 and the 15MB HD..... have the code,not the programmer..
sigh...way too many PIC projects.....and time DOES get shorter , the older you get !!!
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Wed Aug 19, 2020 7:41 am |
|
|
I don't think 'time gets shorter', I think extra jobs come along to use it.
When you are young, an amazing amount of stuff is done for you by your
parents. Then when you go to uni, if something goes wrong with the
plumbing, it is the landlords responsibility. It's only when you own your
own house, that the dripping tap, or the blocked drain, has to be fixed
by you. At the same time if you are competent, friends, and neighbours
learn that you can 'do things', and magically these start to appear....
Today, I lost two hours, fixing the neighbour's television, and then
unblocking a downpipe. |
|
|
ressas
Joined: 15 Nov 2019 Posts: 135
|
|
Posted: Wed Aug 19, 2020 11:02 pm |
|
|
How many hours do you devote to electronics (work) a day?
Do you think you're wasting time spent outside of work?
I think you really know the value of time.
Also, if you have a belief in "HEAVEN", you can continue these works after you die.
Hope true belief in heaven takes you straight to heaven |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Thu Aug 20, 2020 4:50 pm |
|
|
I can handle the downpipe but gee FIXING a TV ? Unless it has 'valves' in it, I'm lost
I did diagnose wife Nissan's electrical probalem to faulty CAN bus communications or wiring... thought about building a PIC-CAN sniffer but soon lost interest after I loaded 1,000+ concrete pavers onto a truck.... |
|
|
|