Skip to main content

Posts

RTL Design & Implementation of a RISC- Single Cycle Processor -Part I

  Low cost FPGA development platforms and Hardware Description Languages like Verilog & VHDL have not only made lives of Front-end VLSI  Engineers easier but also hobbyists' . I have been experimenting with a 40$ Xilinx FPGA development board for couple of years and its real fun. And now, a part of my project for ASIC Design Lab course at University of Minnesota requires me to design and implement a microprocessor. Armed with my FPGA board and a new-found enthusiasm amidst my busy schedule at the U of M, I sat up to design a minimalistic CPU in Verilog. Tools Used: Verilog/VHDL Simulator (ModelSim, Icarus Verilog, Xilinx ISE,etc) A decent Code Editor (VIM) A Xilinx FPGA board (optional) ARCHITECTURE:   I chose Load/Store Architecture for my microprocessor design since most RISC machines like ARM, MIPS,etc are based on this architecture. Besides that, quicker prototyping and better understanding of computer architecture was on top priority in my list...

JTAG - Test Access Port (TAP)Controller based Xilinx FPGA configuration using Raspberry Pi

JTAG - Joint Test Action Group is an IEEE 1149.1 standard used in many silicon devices for programming and debugging purposes. Xilinx FPGAs support this JTAG protocol for their configuration. Here I have designed a JTAG FPGA bitstream programmer using Raspberry Pi which programs the bit file into FPGA in fraction of seconds!  JTAG physical bus has four lines: TMS (Test Mode Select) TDI (Test Data In) TDO (Test Data Out) TCK (Test Clock) Components Used:  Raspberry-Pi Xilinx Spartan 3E FPGA (XC3S250E in Papilio One) Jumper wires BLOCK DIAGRAM: TAP CONTROLLER: The TAP(Test Access Port) controller is a state machine inside the FPGA which changes it's state based on TMS input. For instance, let us assume that the state machine is in " Test-Logic-Reset " state. Now if I drive the TMS pin low and toggle the TCK pin, the state machine will go to " Run-Test/ Idle " state. This is how we move to different states.  Note ...

Audio Playback using ZPU-Soft Processor in FPGA

Having worked with a variety of microcontrollers from AVR to ARM Cortex controllers, I bought a Xilinx FPGA dev board(papilio One) which around $40 to experiment. After getting comfortable with Verilog HDL, I implemented few data encoders-decoders, communication blocks and played around a while. Then my attention turned towards implementing a Soft-core Processor in FPGA. But I need my own instruction set and a Compiler for my soft-processor too. Besides, intensive googling taught me that there are tons of Soft-processor cores. Finally,I settled with ZPU which a 32-bit softcore processor for xilinx FPGA with good amount of peripherals ranging from timers to communication blocks like UART, SPI etc. It has support for VGA screen drivers too. PROJECT: This project was aimed to implement a system to play a small snippet of audio from FPGA's memory using ZPU - soft-core processor. Components used: Papilio One board- Xilinx Spartan XC3S250E A speaker Misc- Resistor...

Shell Scripting to Display Bar Graphs in Linux Terminal

 This week was quite hectic for me with course assignments and their merciless deadlines. One such assignment in Advanced Computer Architecture  was simulation of various benchmarks in alpha architecture in simplescalar , a well-known computer architecture simulator. I was supposed to run a total of 4 benchmarks with different configurations of cache memory, instruction issue widths, commit widths, in-order execution modes, etc and I had to plot the required performance parameters for every benchmark. A conservative estimate would be around 40 plots!  Since the simulation platform was Linux, I could breathe a sigh of relief since most things can be automated using a powerful tool called shell. Scripting made my life easier here since I can automate a bunch of simulations without having to keep an eye on each and every simulation which would take anywhere from 20 minutes to 20 hours.  The problem arose when it came to plotting the performance results. Becau...

Won 2nd place in National Level Electronics Design Contest !!!

Last month could have been never better without the "Electronics For you " design contest ' s results announcement. I was delighted to find my name at the 2nd place in the winner's list under Raspberry Pi category for my project named "Smiley-Pi". Very surprised that my previously discussed project in my blog turned out to be a prize winning project. So what is it?   Smiley - Pi   is a tiny Nokia caller LCD(extensively discussed here & here ) based status notifier for Raspberry-Pi. The name is derived from a mode of operation where it uses various smiley images to indicate system information like temperature. The tiny 0.9", 96x65 monochrome caller LCD of Nokia 2760 is interfaced through bit-banged SPI to the Raspberry-Pi. The base driver application is coded in C and higher level in shell & Python scripts. The user application can use any language which can invoke the driver binaries in it.   Many times we would have ...

Capacitive Touch Sensing using a Coin & ARM Cortex M4

Couple of years ago, I bought a Capsense add-on from Texas Instruments for MSP-430 Launchpad. It worked right out of the box as expected but a closer observation showed me that the board was nothing but a colored copper plate PCB with catchy SMD LEDS beneath. Curiosity drove me to internet and books which taught me the concept of Capacitive touch sensing. Armed with the following tools, I set myself to make my own capacitive sensor circuit. Components Used: Stellaris LM4F120XL ARM Cortex M4F board Resistors - 2 x 2.2 M ohm Wires + Conductive surface ( I used a Coin) PROJECT:  The aim to design a simple capacitive touch sensing circuit and code an ARM cortex microcontroller to sense the capacitance change when a human touches the sensor. STELLARIS LM4F120XL:  The Stellaris launchpad from Texas Instruments is the main processing core of the project.  The following are its features ARM - Cortex M4F core ( Floating point) 256 KB Flash and 32 KB ...

Raspberry Pi based Monochrome Video Playback in Nokia 2760 caller ID LCD

Previously, I was successful in interfacing a   Nokia caller ID LCD using MSP430 microcontroller. This time I wanted to drive it using the $35 single board computer - Raspberry Pi to display vital information like CPU temperature, IP address or any notifications. This idea then turned into something fun and better. I thought why not we try to play a simple video on the LCD driven by Raspberry Pi? Components used : Raspberry- Pi  - ARM 11 Soc based Single board comp @700MHz. Nokia 2760 Caller ID LCD Hirose connector for LCD Connecting Wires  PROJECT: The first step is to display a static image on the LCD. I ported the code which I wrote for MSP430 microcontroller to Raspberry Pi in python language. The code worked well displaying a monochrome image on LCD. However, the display rate is not at all satisfactory. This was no surprise to me since python was very slow in execution and GPIO driving. Then I went back to good old C++ and ported the code an...