关键词 > CSSE2010/7201

CSSE2010/7201 - Introduction to Computer Systems Assignment 1 Semester 1, 2022

发布时间:2022-04-12

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSSE2010/7201 - Introduction to Computer Systems

Assignment 1: Digital Logic Design

Semester 1, 2022

This assignment involves the design and simulation of a digital circuit for the problem specified below.  This will consist of three tasks:

• Design Task: Design a circuit for the problem specification given below.

• Simulation Task: Simulate the circuit you designed in Logisim (or Logisim Evolution).

• Questions: Provide answers to a few questions about your design.

You are required to submit a single zip file containing the completed steps of the design task outlined below and answers to the questions in a  .PDF file (may be either handwritten and scanned or typeset) along with a Logisim or Logisim Evolution file. See the Submission Process section below for more details.


Problem Description

Your task is to design a two-input digital lock system that unlocks only when the password 10010 is entered via a given combination of two inputs. Here, 1 is the first bit and 0 is the last bit of the password. For the lock to open, each bit in the password must appear on the correct input X or Y, with the exact input order depending on the last digit of your student number as shown in table 1.  The system has additional inputs to load digits from the two inputs X and Y and to reset the sequence, and outputs whether the system is currently locked or unlocked as well as the number of digits of the password that have been detected on the X input. The behaviour of these inputs and outputs is further explained in table 2 and a diagram of the system is shown in figure 1. Examples of the behaviour of the system are shown in figures 2 to 4 and table 3.



Last digit of 8-digit student number

Input order to consider for password detection

0-1

2-3

4-5

6-7

8-9

XYXXY

YYYXX

YXXYX

XXYXY

YXXXY

Table 1: Ordering of inputs required for the password to be detected.


Digit X (1-bit)


Digit Y (1-bit) Entry Button (1-bit) Reset Button (1-bit)

Figure 1:


Block diagram of the two-input digital lock inputs and outputs.


Input/Output name

Logisim Component

Function

X

Y

Entry

Reset

Unlocked

X digits detected

Logisim Pin

Logisim Pin

Logisim Button

Logisim Button

Logisim LED

Logisim LEDs

Selects either ‘0’ or ‘1’ for the X input

Selects either ‘0’ or ‘1’ for the Y input        Enters the selected digits on the X and Y inputs

Clears all digits entered asynchronously             Outputs ‘1’ when the system is unlocked, otherwise ‘0’

Outputs the number of digits of the password currently detected on the X input

Table 2: Inputs and outputs of the two-input digital lock.


The following rules apply for the system:

• The system starts with empty sequences of digits i.e. with no digits entered.

• Only the digit on the correct next input is counted towards detection of the password e.g.  if the next element of the sequence is X then only the value of the X input is entered into the lock and the value of the Y input is ignored.

• Digits are entered when the Entry button is pressed (i.e. transitions from ‘0’ to ‘1’ thus providing a rising clock edge).

• The system must display whether it is currently locked (‘0’) or unlocked (‘1’) to a Logisim LED labelled Unlocked.

• The system must display the number of digits currently detected towards the X elements of the password using two Logisim LEDs labelled L1  (the MSB) and L0  (the LSB). This number starts at ‘0’ and is incremented every time a correct digit is successfully entered on the X input. This value is reset if a new detection of the password begins.

• If the Reset button is pressed at any time, all digits entered are immediately cleared.  This is an asyn- chronous reset,  occurring immediately when the Reset button is pressed,  separate to the main clock provided by the Entry button. The lock should not operate while the Reset button is held down.

• The system detects whether the password has been entered at the end of the sequence of digits entered. The system will still unlock if incorrect digits are entered prior to the correct password being entered and detected. This behaviour is shown in figure 2 and table 3.

• The system becomes locked again as soon as any other digit is entered when the system is unlocked or the Reset button is pressed.

• The system does not detect overlapping’ of passwords. Once the system has been unlocked a subsequent unlock can only occur by correctly entering all digits of the password on the correct inputs again.  This can occur directly from the unlocked state i.e. the first digit of the password can be detected as soon as the system has been unlocked. See the example in figure 3 for the expected behaviour.

Examples

A collection of examples detailing the behaviour of the two-input digital lock are shown below in figures 2to 4 and table 3. For each of the examples

• The password is 10010.  The digits of the password are detected left-to-right i.e. the first digit to match is 1. On the diagrams, digits are entered according to the CLK index (from the inside to the outside).

• For the examples,the password input order is XYXYX.

• The                           indicates whether X or Y is the current input being detected.

• The  coloured boxes  correspond to the password digits being successfully detected.

• The output behaviour corresponds to after the inputs have been entered (i.e. after the Entry button has been pressed).


0 1

X

Y

Entry

Reset

0 0    0    0    0    1    0

00  01 01  10  10  11  00



7    6    5    4    3    2    1 CLK index 1    2    3    4    5    6    7

Figure 2: Example of the correct password being entered and detected. The same example is shown in tabular form in table 3.




1

X

Y

Entry

Reset

0    0 0    0    1    0    0    0    0    1

01 01  10  10  11  01  01  10  10  11



10   9    8    7    6    5    4    3    2    1                                                                               1    2    3    4    5    6    7    8    9   10

CLK index

Figure 3:  Example of two successive detections of the password.  As mentioned above, the system does not consider overlapping.




1    1

X

Y

Entry

Reset

0 0    0    0    0    0    0

00  01 01  01  00  00  00




7    6    5    4    3    2    1 CLK index 1    2    3    4    5    6    7

Figure 4: Example of the password not being detected. Note at CLK index 4, the previous detection fails but a new detection starts. That new detection also fails.