Chapter 7 (pp. 337-345) and Chapter 8 (pp. 383-395 and 400-412) of the Katz text.
`timescale 1 ns / 1 ns module mystery_module; `include "mystery.tfi" initial begin clk = 0; forever begin #5 clk = 1; #5 clk = 0; end end initial begin #1 d12=0; #10 d12=1; . . . end endmoduleTurn in simulation waveforms and an explanation of how the waveforms let you arrive at your conclusions.
MODULE simple interface (x, clr, clk -> z); TITLE 'simple sequential circuit' x, clr, clk pin; z pin istype 'reg, buffer'; EQUATIONS z.clk = clk; z.clr = clr; z := z.fb # x; ENDIn addition, you should map your .abl file to a E0320 PLD. You'll note that this PLD (see the schematic for the PLD handed out with Assignment 5) does not have flip-flops with a clear/reset input. Thus, if you look at the "Chip Report" you'll see that the ABEL compiler will change the equation for the input to the flip-flop to include clr as an input signal as follows:
z.D = ( !clr & z.Q # !clr & x ); z.C = ( clk );You will also note that the flip-flop being used is clearly a D FF and "z :=" has been
This is possible one the compiler knows the type of flip-flop being used. In the original specification, things were more generic so that the compiler could map to different FF types (e.g., RS, D, JK, etc.).
Turn in simulation waveforms and an explanation of how the waveforms
let you arrive at your conclusions.
counter interface (clk, rst -> q7..q0); cntr1 functional_block counter;You can then refer to the inputs and outputs of the cntr1 instance of the counter module using the "." extension notation (e.g., cntr1.rst (the reset input of the counter module instance), cntr1.[q7..q0] (the 8-bit output of the counter module instance)).
Your shift register sub-module should consist of a cell with a
single flip-flop and three inputs (DI, SR, and SL). There should
also be two control inputs: S0 and S1. When S0 and S1 are (11),
DI should be loaded into the flip-flop, for (01) SL should be
loaded in, for (10) SR should be loaded in, and for (00) the flip-flop
should hold its current state.
Turn in you ABEL and/or schematic files and simulation waveforms that show your shift register loading in the pattern 1011 and then performing an circular shift right, followed by an arithmetic shift right, followed by a hold, followed by a logical shift left, followed by another logical shift left.
Turn in your ABEL file and waveforms for a simulation that begins by resetting the counter and the counts for 9 clock cycles. Include a state diagram for the counter. Also turn in a map of the E0320 PLD showing how the ABEL compiler maps the design to the PLD.