A 32-Bit Computer for LatticeXP2 Brevia Development Kit

Download Report

Transcript A 32-Bit Computer for LatticeXP2 Brevia Development Kit

eP32 Workshop
2012 FIG Taiwan Conference
February 17, 2012
Chen-Hanson Ting
Summary







Brevia FPGA Development Kit
Architecture of eP32
Implementing eP32
Memory and IO
Brevia Board and LatticeXP2
ispLEVEL and Diamond IDE
Demomnstration
eP32 Workshop









Downnload and install DIAMOND 1.4.
Install FTDI USB driver.
Request and install DIAMOND license.
Copy ep32_xp2_5 project.
Import ep32_xp2 project.
Compile and synthesize ep32_xp2.
Program eP32 to Brevia2 Kit.
Bring up HyperTerminal.
Do exercises on eP32 through HyperTerminal.
Interact with eP32









Type and test the following commands:
WORDS
HEX 0 80 DUMP
‘ DUP 80 DUMP
HERE .
12+.
COLD
1 2 3 4 5 .S
***.
Compile Test Commands
Compile
: TEST1
: TEST2
1 TEST2
0 TEST2
: TEST3
: TEST4

the following commands:
1 2 3 4 5 ;
IF 1 ELSE 2 THEN . ;
FOR R@ . NEXT ;
FOR 1000 FOR NEXT NEXT ;
Test IO Ports on Brevia2 Kit
Turn LED’s on and off:
HEX FF E0000001 !
FF E0000000 !
A5 E0000000 !

Read switches and buttons:
E0000002 @

Exercise

Rewrite the TRAFFIC program for eP32
and try to compile and exercise it.
Final Question

How can you ‘Turnkey’ the TRAFFIC
program?
(‘Turnkey’ means to embed an application
program so that it runs when the board
powers up.)
Remarks



eP32 is the simplest microcontroller. You can
understand it and make use of it.
Brevia2 is the cheapest FPGA development
system. You can use it to do very useful
things, if you can get eP32 on board.
The possibility is only limited by your
imagination.
Questions?
Comments?
Still Awake?
Conclusion

FORTH allows you to optimize an application
on all these levels:





Solve the problem with high level FORTH
commands.
Change high level commands to primitive
commands.
Change primitive commands to CPU instructions.
Build specialized IO devices for specific tasks.
Build special purpose computer for special tasks.