Sunday 3 July 2016

Test Bench




whenever you need to store value you use reg
and whenever you have to just keep value you use wire

from test bench when you provide inputs then you can say that you have provided stimulas

If you see the above diagram you can see that you have to provide your stored value as input in your design module so you are bouded to use reg

whereas for analyzing the output you have to use wire

You should know that tool is use tool is use to see the simulation



`include "and2.v"              //we extenstion is must  .v symbol

`timescale 1ns/100ps

this means it will consider #10 as 10 ns

`define clockperiodby2 10 //10ns half period is 50MHz
in above define commad you can use any name

the define command is use to assign this delay anywhere you like.For eg

clockperiodby2 clk=!clk;


when you sythesis your code in fpga you just burn design and thus there is no meaning of hash delay's .obivously as test benches are just an another way to test ur design through simulation other than FPGA. Anyway i also admity FPGA is more fun full way of testing your circuit.




It is safe to send data before posedge if you have it in your sensitiity list .Sending data after posedge makes no use


In always block you must use blocking assignment i.e <= and not "=" .However you can use any in intial block





Common Mistakes while writting test bench

Spelling of Initial

Ignoring Begin end



Anyway there are many beautiful way's of checking simulation

Using System Verilog {costilier way}--tools are crossing 1 lakh rupee

System C [Inspire from Circuit Sutra]---Basically company works on finding Verification Methodoly for Hardware design

Python scripts  [Inspire from Here]

Tuesday 21 June 2016

Inside CPU

















Free Electricity at home

Telecome Industry Never tell you about the free electricity that they provide in your telephone lines




Wednesday 8 June 2016

COUNTERS

WHY COUNTERS ?

Ans. As clock just generate a pulse similarly counter generates a counting with the help of this pulse.

Note: In counter's we go from LSB to MSB  Q0--Q3
and while writing a sequence from waveform write carefully from MSB --LSB Q3--Q0
ASYNCHRONOUS COUNTER
--These are also Known as Ripple Counter
--As there is a more delay compared to synchronous there fore there comes a gliches in its waveforms
--Moreover in Asynchronous counter there is no combinational circuit in input so here
Tclk>=Tc-->q

Unlike synchronous counter having Tclk>=Tc-->q + Tpd(propogation delay of combination logic)

--In Asynchronous while making waveforms we have to just see the +ve edge of clock
   whereas
  In Synchronous you also have to see waveform of input of flipflop combinational logic apart from +ve edge of clock.












SYNCHRONOUS COUNTERS

These counters saves us from glitch waveforms all outputs in these are having same delay 
--FSM
--MOD COUNTER
--EVEN COUNTER
--ODD COUNTER


3-BIT SYNCHRONOUS COUNTER



4-bit Synchronous Counter


Difficult Synchronous Counter




Tuesday 31 May 2016

TPU

TPU (Tensor Processing Unit)




-->Google has said that this device is far away better than CPU,GPU,FPGA's.
-->This is far better from above devices as it uses less transistor per unit watt
-->But contrary some blogs says at same time it occupies more power
-->This is use to develop custom hardware
-->This will be attached to the Hardisk's at Google data centre
-->One can develop custom Hardware's Using these TPU access through cloud i guess.
-->Google street view and its deep mind technology Alpha Go (Chinese Game that represent human brain) works on this TPU.
--> It is 7 generation higher than More's Law
-->It is develop with an requirnment that great softwares needs beautiful hardware
-->It is discussed in I/O conference Google by CEO sundar pichai


Reference :-Google Blog

Watch Last few minutes of speech by CEO Sundar Pichai in below video



Sunday 22 May 2016

Interfaces (I2C ,SPI, RS232)

Interfaces are the protocols that are required by the devices to interact. Some of the common Interfaces are I2C,SPI,RS232 Interface.
Among three interface SPC is fastest after that comes I2C and finally RS232 which not has any clock. Watch below video to gain practical Knowledge too about above mentioned interfaces.Arduino has inbuilt SPC,I2C interface. and  Raspberrypi has inbuilt all interfaces. 

In below Video Ben Heck
Used SPC--to interface distance sensor with arduino
Used I2C--to interface temperature sensor with arduino
Used RS232--to interface Speaker using chip which too interfaced with the chip of RS232 which finally connected to computer where command were desired words were written to hear one by user.

Watch Below Video for better Understanding.


UART

Adding UART(Universal Asynchronous Receiver Transceiver




For More Information [Click Here]

UART
--UART is the universal Asynchronous Receiver Transiver
--It is the protocol is a self-syncronizer that is without synchronous clock with host (transceiver) the data automatically sends to the receiver.

To Understand the protocol of UART you should understand following terms

SPI Interface (Serial Peripheral Interface)--It is the protocol made by motorolla .this is a 4 wire serial communication .use to transfer data from peripheral to microcontroller/microprocessor or b/w microprocessor to microprocessor

 For More Info [Click Here]

FIFO MODE(First in First Out Mode)--It is the mode that is use in

For More Info [Click Here]

For More Knowledge from eye of chip designer Visit [Click Here] (Given Text in very interesting way)