Dept. Logo
Lab Home page
Department of Microelectronic Systems, Faculty of Electronics, Telecommunications and Informatics, Gdansk University of Technology Logo Wydziału
Flaga PL Polska wersja

Parity generator

Task: Design a circuit generating parity bit of 8-bit word. The 8-bit word has to be set using switches SW0-SW7 on the prototype board. Parity has to be shown on LED display: E - even number of "ones" in 8-bit input word, O - odd number of "ones" in 8-bit input word.

Widok płytki


Students have to perform functional simulation and to practically check the circuit by programming the prototype board. The prototype board contains four seven-segment LED displays with common anode, designed to drive segments using multiplexing. The result should be displayed on digit AN3. All the segments of all 4 LED displays are connected together, i.e. all segments A are connected together, all segments B are connected together, etc. Common anodes are for activating specific digit. Segments (A-G) are driven with active low signal, also digits AN0-AN3 are active low. For example, to blank digits 0-2, signals AN0-AN2 should be driven with logic '1'. Additionally, to display letter "A" on display 3, the following signals have to be asserted: AN3='0' and A='0', B='0', C='0', D='1', E='0', F='0', G='0', DP='1'.

UCF file for the exercise, Digilent Spartan-3 board, Spartan-3 3S200 FT256-4:
#########################################################################################
# Seven-segment LED display:
NET "led7_an_o<3>" LOC = "E13" ; # leftmost digit, active low
NET "led7_an_o<2>" LOC = "F14" ; # active low
NET "led7_an_o<1>" LOC = "G14" ; # active low
NET "led7_an_o<0>" LOC = "d14" ; # rightmost digit, active low
#
NET "led7_seg_o<7>" LOC = "E14" ; # segment 'A', active low
NET "led7_seg_o<6>" LOC = "G13" ; # segment 'B', active low
NET "led7_seg_o<5>" LOC = "N15" ; # segment 'C', active low
NET "led7_seg_o<4>" LOC = "P15" ; # segment 'D', active low
NET "led7_seg_o<3>" LOC = "R16" ; # segment 'E', active low
NET "led7_seg_o<2>" LOC = "F13" ; # segment 'F', active low
NET "led7_seg_o<1>" LOC = "N16" ; # segment 'G', active low
NET "led7_seg_o<0>" LOC = "P16" ; # segment 'dp', active low
#########################################################################################

#########################################################################################
# Slide switches:
# sw7 Sw6 sw5 sw4 sw3 sw2 sw1 sw0
NET "sw_i<0>" LOC = "F12" ; # active high when in UP position
NET "sw_i<1>" LOC = "G12" ; # active high when in UP position
NET "sw_i<2>" LOC = "H14" ; # active high when in UP position
NET "sw_i<3>" LOC = "H13" ; # active high when in UP position
NET "sw_i<4>" LOC = "J14" ; # active high when in UP position
NET "sw_i<5>" LOC = "J13" ; # active high when in UP position
NET "sw_i<6>" LOC = "K14" ; # active high when in UP position
NET "sw_i<7>" LOC = "K13" ; # active high when in UP position
#########################################################################################

Wyświetlacz LED
Fig. Connections of segments and digits of LED display. Example of displaying digit '2'