AIM: To generate the pseudo random sequence using linear feedback shift register and verify the output using truth table in bread board and HDL software.
APPARATUS REQUIRED:
DFF(IC 7484) XOR (IC 7486) Digital Trainer kit Connecting wires Personal Computer with Windows operating system Xilinx 14.3 software
PROCEDURE:
Hardware: Connections are made as per the circuit diagram. Logic inputs are given as per the circuit diagram. Observe the output and verify the truth table.
Simulation:
Write and draw the Digital logic system and write the Verilog code for above system. Enter the Verilog code in Xilinx software. Check the syntax and simulate the above verilog code (using Xilinx) and verify the output waveform as obtained.
THEORY: PRBS generator generates pseudo random binary sequence based on the concept of linear feedback shift register.It is pseudo because it is deterministic and after n elements it starts to repeat itself, unlike real random sequences. Random numbers for polynomial equations are generated by using the shift register circuit. The random number generator is nothing but the Linear Feedback Shift Register(LFSR). The shift registers are very helpful and versatile modules that facilitate the design of many sequential circuits whose design may otherwise appear very complex. In its simplest form, a shift register consists of a series of flip-flops having identical interconnection between two adjacent flip-flops. Two such registers are shift right registers and the shift left registers. In the shift right register, the bits stored in the flip-flops shift to the right when shift pulse is active. Like that, for a shift left register, the bits stored in the flip-flops shift left when shift pulse is active. In the shift registers, specific patterns are shifted through the register. There are applications where instead of specific patterns, random patterns are more important. For a 4-bit PRBS generator, LFSR consist of 4-registers connected together as a shift register. Here, we used D flipflop as a register. The input to the first register comes from the XOR of third and fourth output bits of the register. The inputs fed to the XOR are called the tap sequence and are often specified with characteristic polynomial. On reset the register must be initialized to a non zero value(all 1s).The output sequences through all 2^n-1 combinations when clock signal is given. Obviously, its possible to get a longer m-sequence using more stages to the shift register. The formula connecting these is: m=2^n-1.Where m is the length of the m-sequence and n is the number of shift register stages. The pseudo-random sequences are handy for built-in-test and bit-error-rate testing in communication links. They are also used in many spread spectrum communications systems such as GPS and CDMA and encoding and decoding the error control codes. LFSRs used as a generators of pseudorandom sequences have proved externally useful in the area of testing of VLSI chips.
Logic Diagram:
Verilog Coding:
module prbs(q,qb,clk,clr); output [3:0] q,qb; input clk,clr; reg [3:0] tmp, tmpb; always @(negedge clk or posedge clr) begin if(clr) begin tmp = 4'b1111; tmpb = 4'b0000; end else tmp = { tmp[3],tmp[2],tmp[1], tmp[3]^tmp[2]}; end assign q=tmp; assign qb=tmpb; endmodule
RESULT: Thus the operation pseudo-random number was verified using hardware and software simulations
Ex. No.: ARITHMETIC LOGIC UNIT DESIGN Date:
AIM: To design the Arithmetic Logic Unit using logic gates and HDL software. APPARATUS REQUIRED:
IC7408 IC7411 IC7432 XOR (IC 7486) Digital Trainer kit Connecting wires Personal Computer with Windows operating system Xilinx 14.3 software
PROCEDURE:
Hardware: Connections are made as per the circuit diagram. Logic inputs are given as per the circuit diagram. Observe the output and verify the truth table.
Simulation:
Write and draw the Digital logic system and write the Verilog code for above system. Enter the Verilog code in Xilinx software. Check the syntax and simulate the above verilog code (using Xilinx) and verify the output waveform as obtained.
THEORY: The arithmetic logic unit (ALU) is a digital circuit that calculates arithmetic operations (addition, subtraction, etc.) and logic operations (Exclusive OR, AND, OR etc.) between two numbers. The ALU is a fundamental building block of the central processing unit of a computer. Many types of electronic circuits need to perform some type of arithmetic operation, so even the circuit inside a digital watch will have a tiny ALU that keeps adding 1 to the current time and keeps checking if it should beep timer etc. ALU units typically need to be able to perform the basic logical operations (AND, OR) including the addition operation. The inclusion of inverters on the inputs enables the same ALU hardware to perform the subtraction operation (adding an inverted operand) and the operations NAND and NOR. A basic ALU design involves a collection of ALU Slices, which each can perform the specified operation on a single bit. There is one ALU slice for every bit in the operand. The basic 2 bit ALU is designed using logic gates. The AND, OR, EX-OR gates are used to perform the various operation such as OR, AND, XOR and addition. The 8:1Multiplexers are used to select between the various operations: OR, AND, XOR and addition. All the operations are performed in parallel and the select signal (OP) is used to determine which result to pass on to the rest of the data path. The carry signal is only used for addition, is generated and passed out of the ALU for every operation.
TRUTH TABLE:
Data Inputs: A and B
S1 S0 OPERATION 0 0 Sum of A & B 0 1 Carry of A& B 1 0 B A 1 1 B A
Thus the operation Arithmetic Logic Unit was verified using hardware and software simulations
Ex.No.: MICROCONTROLLER BASED SYSTEMS DESIGN
AIM: To design microcontroller based system for simple applications like security systems combination lock etc. using 89c series flash micro controller.
APPARATUS REQUIRED:
1. 8051 microcontroller 2. Stepper Motor 3. Interface card
THEORY:
A motor in which the rotor is able to assume only discrete stationary angular position is a stepper motor. They are used in printer, disk drive process control machine tools etc. Two-phase stepper motor has two pairs of stator poles. Stepper motor windings A1, A2, B1, B2 are cyclically excited with a DC current to run the motor in clockwise direction and reverse phase sequence A1, B2, A2, B1 in anticlockwise stepping
Two-phase switching scheme: In this scheme, any two adjacent stator windings are energized.