Posts

Showing posts with the label VLSI Systems

Path Trace

Hello, I am posting an old program here that was written by me to trace different paths in a circuit. It is written in Perl and works for verilog (.v) files. The program recursively iterates through every path in the circuit and it prints out the gates encountered en-route.  It is useful if you are calculating a metric for each gate/wire This is a way to NOT write a program. The program, as I found out later, is very slow because It does not build the data structure for gates that makes traversing easier It works with gate names instead of numeric abstractions which are easier to deal with.  The better way to traverse through a circuit is to build a data structure for each gate encountered. Each gate should be assigned a number and there must be arrays in the data structure that holds information on the gates at its input and output. This makes traversing in both directions easier. Sample data structure struct gate{ char name[]; int num_in; int num_out; int i...

SOC Encounter for layout generation

Image
The netlist for the interfaced design is available. This is to be ported into SOC encounter to generate a layout. Design methodology – top down The design is synthesized so as to define the components in standard cells of the OSU 25 library. This synthesized netlist is imported to encounter to generate the layout. The Steps for chip planning in Encounter are 1.Import netlist 2.Floor plan 3.Create a black box partition of the memory 4.Power planning 5.specify modules and black boxes position on the chip 6.special route 7.Run placement 8.Assign pins for the black box 9.Run trial route – analyze for congestion 10.Run nano route 1. IMPORT NETLIST     The synthesized netlist is imported into encounter and the osu25_stdcells.lef and osu25_stdcells.tlf libraries are mapped. The power nets and ground nets are specified to be “vdd” and “gnd”. 2. FLOOR  PLANNING The sizes of the individual modules were measured for a total utilization of 70%. A memory gen...

Interfaced Design

Image
This post is about interfacing all the modules of the obstacle avoidance project and optimization techniques. The design is inter connected in the HDL description itself. The memory is defined as a black box. A black box in VHDL is an entity without an architecture. Since the memory is to be added later, it is described as a black box. The VHDL files for the interfaced design is sourced into the RTL compiler. As you can see, a lock to the side of the memory module. This shows that the memory is a black box. The netlist is generated for this design using RTL Compiler. The next step is verification of this netlist. But since the memory is not available, it cannot be tested. DESIRED FREQUENCY OF OPERATION The desired frequency of operation was set to 0.5 GHz (2000 ps). The clock was set to this requency using the set clock command of RTL compiler. The worst negative slack is calculated.  It is seen that for a frequency of 0.5 GHz, the worst negative slack is -1406 ps and henc...

Synthesis of the Motor Controller

Image
The Flow of Asic design is 1. RTL Description 2. Simulation and testing of functionality 3. Synthesis of netlist using RTL Compiler 4. Verification of resultant netlist The HDL Description of the motor controller is available. The next step is to synthesize it to a netlist made up of the standard cells. The library used is the osu025_stdcells.lib The HDL files for the motor controller are read by the RTL Compiler. The following lines are added to a tcl file which is then sourced from the RTL Compiler File : rtl.tcl set_attribute lib_search_path /path_to/cadence/local/osu_soc_v2.7/cadence/lib/tsmc025/signalstorm read_hdl -vhdl  ../HDL/motor_controller.vhd (location of motor controller) elaborate synthesize -to_mapped write -mapped > motor_controller.v write_script > script This script was edited and sourced in the RTL compiler to synthesize the motor controller for verification. Note: no optimization parameters are specified. as you can see the synthe...

MOTOR CONTROLLER TO OPEN8 INTERRUPT INTERFACE

Image
The Interrupt from the motor controller to the CPU needs to be high for 1 clock cycle. There is not interrupt acknowledge signal from the Open8 CPU that can turn off the interrupt after 1 clock signal. If the motor controller interrupt is more than one clock cycle, The CPU interprets it as a separate request. So there is a need for a moderator that  Receives an interrupt request from the motor controller Responds to the interrupt by sending a signal to the CPU interrupt line which is high for exactly one clock cycle.  After sending the interrupt request to the CPU, sends an interrupt acknowledge signal to the motor controller.  This moderator is Int_req_ack module. The Int_req_ack module has a 2 bit counter which is initialized to “00”.  When the motor interrupt goes high, the counter is incremented by 1 every clock cycle and the interrupt_CPU line goes high. Since we need the interrupt_CPU line to be high for exactly one clock signal, the counter is rese...

MOTOR CONTROLLER BLOCK DIAGRAM

Image
SPECIFICATION: The motor  controller is provided with a control word from the open8 micro controller. The control word is 8 bits wide, bits 3 down to 0 represents the number of steps that is to be moved. Bits 5,4 selects the motor that is to be rotated and bit 6 is used to select the direction of rotation (forward or reverse). Bit 7 is used for selecting between interrupting or not interrupting the microcontroller after task is completed. Contorl word (8 bits) - control_word_reg 1.Bits 3 down to 0 – Number of steps to be rotated (step_counter) “1111” - 15 steps (example) 2.Bits 5 down to 4 – (select) The Motor that is to be rotated (Motor_select) Control_word(5) = 1, left motor is selected Control_word(4) = 1, right motor is selected Control_word(5,4) = “11”, both motors are selected Control_word(5,4) = “00”, No motor is selected 3.Bit 6 – Direction of rotation of the selected motor(s) (Motor_direction)  Control_word(6) =  0, forward direction of rotation  Co...

MOTOR CONTROLLER

Image
The motor controller is the interface to the stepper motor. Stepper motor has four coils. The coils of the stepper motor are to be energized as follows for it to rotate forward. Stepper motor operation So to rotate the stepper motor in the “forward direction”, the sequence 1100 is to be right shifted by one bit for each step. A step is defined as the linear distance traveled when the sequence is shifted right by one bit. To rotate the stepper motor in the “reverse direction”, the sequence 1100 is to be shifted left by one bit for each step. Thus the operation involving rotation of the stepper motor is shifting the sequence 1100 right or left onto the coils of the stepper motor. An encoder provides feedback upon completion of one step rotation. The feedback signal is used as an indicator to shift the next pattern in. Step Angle: There are 4 steps in 360 degrees. Hence the step angle is 90 degrees step angle = 360/4 = 90 if the diameter of the wheel is 5 cm, the distance ...

Modification of OPEN8 core to interface with the Memory

Image
The open8 core is to be modified to interface with the memory. The modification is described here. REFERENCE TO THE OPEN8 INSTRUCTION SET GUIDE Description : There is an implementation change to the open8 core so as to interface it with the memory provided with us. The implementation change is for instructions RTI (return from interrupt) and RTS(return from subroutine). BUG 1. The interrupt occurs 2. There are 3 bytes that are stored in the stack The PSR and the 16 bit memory return address. They are stored in memory locations 127, 126, 125. This is with accordance with the Instruction set guide. 3. After stack operations is done, it  jumps to the ISR. ISR is pointed to location pointed to in memory by 129,128 as specified in the Assembly language reference manual. 4. In the ISR, it continues to execute code and when I use the RTI instruction, the control does not resume execution from where it left off. Instead it starts executing form location 0. 5. When RTI is executed...

INTERFACE BETWEEN Open8 and MEM

Image
A 256 byte memory model is described in VHDL to using on chip BRAM for testing on FPGA board. It is interfaced with the Open8 soft processor. It is used as both program memory and data memory. The program can be loaded in binary into the memory, interfaced with open8 and can be simulated using modelsim. 1. Using the BRAM in the FPGA board as program memory/Data memory. Memory Size open8 has 16 bit address lines. I have implemented a 256 byte RAM (Uses the internal BRAM of the spartan3 FPGA) to connect it to the FPGA. The memory entity is described below ----------------------------------------------------------------------------- -- Memory: RAM -- Desc: Instruction/ data memory -- no of entries : 256 bytes -- no of bits    : 8 -- we - write enable -- re - read enable -- en - select memory -- addr - address(8 bits) -- di - data in  (8 bits) -- do - data out (8 bits) ------------------------------------------------------------------------------ entit...

Layer 0 - obstacle avoidance of SUBSUMPTION Architecture

Image
PROJECT : It was required to build a system on chip using the following components 1.An open core from www.opencores.org 2.A custom block implementing a functionality 3.A memory which is generated by a memory generator built by professor Garrett Rose. I read through different topics but my interest in robotics kicked in when I read a paper on subsumption architecture described in the paper “A Robust Control System for Mobile Robots” by the famous H.A. Brooks from the AI lab at MIT. INTRODUCTION Subsumption architecture is a layered architecture for building control systems for robots. The  control system is composed of number of individual layers. Each layer performs a function independent  of the other layers. For example consider a robot composed of the following layers Layer 0: Obstacle avoidance Layer 1: Wandering Layer 2: moving towards an object of interest Layer 0 is the lower most layer, There is a processor just for this layer that receives input from the se...

6T SRAM Cell design, Implementation and Testing

A lot of text books are available which tell us the logical operation of 6T SRAM Cell. But only a few deal with the actual calculations of the widths of the transistors. I took up the challenge to design a 6T SRAM Cell from scratch. The detailed report of my work in building a 6T SRAM incorporating the read and write conditions can be found using the following link. https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B4rJ5uMNHA9pMDZlNDU4ZjctODViYS00MWZhLThlNmYtMjcxNzllMzVjMGY1&hl=en&authkey=COiuv6EC The schematic is tested using the test circuit shown in the circuit. Layouts are drawn using Cadence Virtuso. Was a great learning expeirence. Abishek Ramdas NYU Poly