计算机作业代写|CSSE2010/7201 – Assignment 1: Digital Logic Design

这是一篇来自澳洲的关于Introduction to Computer Systems(计算机系统介绍)数字逻辑设计的计算机作业代写

 

This assignment involves a design/simulation task and a circuit construction task as outlined below.

  • Design and Simulation Tasks (Part A): Provide design details and simulations in Logisim for the problems specified in Part A1 and Part A2. The submission for Part A is a PDF document, either electronically typeset or handwritten and scanned. Part A requires simulating and testing the circuits in Logisim. Submit the Logisim circuit files as partA1 xxxxxxxx.circ and partA2 xxxxxxxx.circ, where xxxxxxxx is your 8-digit student number..
  • Circuit Construction (Part B): Verify the functionality of the circuit described in Part B via circuit construction. Submission for this part includes a photo of the constructed circuit and a video showing the operation of the circuit.

Submission is a single .zip file containing the above. More details are given in the submission section.

Part A – Design and Simulation Tasks [56 Marks]

Part A1 – Traffic light controller [32 marks]

Your task is to design a traffic light controller system at the pedestrian crossing as illustrated in Figure 1.

Figure 1: Pedestrian crossing across a one-way street with push button to control the traffic flow.

The initial state of the system is (CARS: green; PEDESTRIANS: red) [CGPR] and the pedestrian button is not pressed (button_input = 0). When the pedestrian button is held pressed (button_input = 1) and the system is clocked (clock tick controlled via manual_clk button), the traffic controller system transitions into a state (CARS: orange; PEDESTRIANS: red) [COPR]. On the next two clock ticks, the system ignores button_input value. On the first of the two clock ticks, the system transitions into (CARS: red; PEDESTRIANS: green)

[CRPG] state. On the second clock tick, the system returns to the initial state (CARS: green; PEDESTRIANS:

red) [CGPR]. Your task is to design a digital logic circuit implementing the traffic light control described above.

Your design MUST handle unexpected/unspecified states and their associated logic, preferencing smooth pedestrian traffic over cars. You should explicitly state any assumptions you make outside the above specifications.

The digital circuit should have the inputs and outputs as illustrated in Figure 2.

Figure 2: The traffic light controller inputs and the LED control bus.

As part of the design task, you will need to complete the following design steps:

  1. Draw a state diagram. Your state diagram should be complete and drawn according to the standard guidelines mentioned in the lectures and labs. [4 marks]
  1. Create a two-dimensional state table for your state diagram. [4 marks]
  2. Choose two possible encodings for the states you have chosen (i.e. binary, gray code or one-hot encoding).

For each selected encoding create a state table (either 1D or 2D). You should have either two 1D tables or two 2D tables upon completing the task. Note that the 1D state table will have more rows (essentially a truth table) and the 2D state table will be more compact. You can determine the logic expressions (in the next step) from either 1D or 2D state tables. [8 marks]

  1. Write Boolean expressions for the next state logic and output logic for both chosen encodings. Simplifying these expressions is not required but will make the next steps easier. [4 mark]
  1. Choose one encoding scheme to continue with and draw a logic diagram for the traffic light controller circuit with your chosen encoding. Justify your choice of encoding relative to the complexity of your next state/output logic [8 marks]
  1. Simulate and test the circuit in Logisim. [4 marks]

NOTE: You should be able to build this circuit using no more than 3 logic ICs as per instructions in Part B.

Part A2 – Traffic light controller with additional safety considerations [24 marks]

”We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard; because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one we intend to win, and the others, too.” – JFK

An analysis of the original system developed in Part A1 revealed that a potential safety hazard could occur if the setup changed from (CARS: red; PEDESTRIANS: green) [CRPG] to (CARS: green; PEDESTRIANS: red)

[CGPR] because the Pedestrian would receive no warning that the lights were going to change. A decision was made to add a Pedestrian Orange light, as well as include two extra light states (CARS: red; PEDESTRIANS:

red) [CRPR] into a cycle, which is designed to prevent collisions by ensuring that all movements have finished before crossings occur. Figure 3 and 4 illustrate the safer pedestrian crossing scenario.

Figure 3: Pedestrian crossing across a one-way street with improved safety.

Figure 4: Advanced traffic light controller inputs and LED control bus.

The new light cycle is now [CGPR] [COPR] [CRPR] [CRPG] [CRPO] [CRPR]. The light cycle starts when button_input is pressed. You should consider unexpected/unspecified states in your design and justify your choices in terms of safety rather than transition logic and output logic complexity.

Design this new safer version of traffic light controller using the following steps:

  1. Draw a state diagram. Your state diagram should be complete and drawn according to the standard guidelines mentioned in the lectures and labs. [4 marks]
  1. Create a two-dimensional state table for your state diagram. [4 marks]
  2. Choose an encoding and create a state table (either 1D or 2D) with your chosen encoding. [4 marks]
  3. Write Boolean expressions for the next state logic and output logic. Simplifying these expressions is not required but will make the next steps easier. [4 marks]
  1. Draw a logic diagram for the traffic light controller circuit with safety measures implemented. [4 marks]
  2. Simulate and test the circuit in Logisim. [4 marks]

NOTE: Part A2 should only be attempted after completing Part A1. Solution will require using around 20 gates. DO NOT BUILD this complex circuit in Part B. In part B, you should construct the circuit from Part A1, which you should be able to build with no more than 3 logic ICs.

Part B – Circuit Construction [24 Marks]

This task requires you to build your circuit from Part A1, and verify functionality by constructing and testing the circuit on a breadboard. The pedestrian button, clock input, and reset input should all be connected to I/O board pushbuttons. The traffic light outputs should be connected to appropriately coloured LEDs on the I/O board: Car traffic lights (red, orange, green) to be connected to L7, L6, L5 respectively, and pedestrian lights (green, red) to be connected to L2 and L1 respectively.

Test Cases

To demonstrate the functionality of the circuit, your video must show two test cases:

  1. The first case should show a pedestrian holding down the pedestrian crossing button and repeatedly pressing the clock. We should see the traffic light cycle through all traffic light states, and the circuit should keep repeating this traffic light sequence.
  1. The second case should show the pedestrian crossing button pressed for the first clock cycle, then released.

We should see the traffic light move through the traffic light sequence, then stop at the initial state forever (CARS: green; PEDESTRIANS: red).

Steps to Build the Circuit

To minimise errors in building and testing the circuit, it is highly recommended that you build the circuit progressively as detailed below, and test the circuit behaviour at each stage. You are only required to submit a final video showing the operation of the circuit as outlined above. However, you may want to record the output of each incremental step below, so that, if your final circuit doesn’t work, you can submit the outputs of progressive steps and receive partial marks for any correct intermediate outputs. If your final circuit is fully working, then there is no need to submit the intermediate recordings. Marks will be awarded based on demonstrated functionality only. You should be able to build this circuit using no more than 3 logic ICs,however no marks will be deducted if you use more than this. Additional wire kits can be provided during the lab sessions if needed.

  1. Place the required logic ICs on your breadboard, and connect their power supply pins as shown in Figure 5.

It is advisable to keep these ICs relatively close to the I/O board to keep wiring short.

Figure 5: Step 1 – Logic ICs on breadboard.

  1. Connect the SET input of the flip-flop IC directly to VCC, as shown in Figure 6. If these are not connected,the flip-flops will not work.

Figure 6: Step 2 – SET connections.

The remainder of the build will depend on your circuit implementation. The following steps are recommended:

  1. Connect your pedestrian button, clock button, and reset button to the required inputs as dictated by your schematic, shown in Figure 7.

Figure 7: Step 3 – Input connections.

  1. Implement the required transition logic and output logic using the logic gates from your schematic, shown in Figure 8. Note, this implementation may look quite different from your implementation – this is to be expected.

Figure 8: Step 4 – Transition and output logic.

  1. Connect the outputs to the I/O board LEDs. Connect the car traffic light outputs (red, orange, green) to LEDs (L7, L6, L5 respectively). Connect the pedestrian light outputs (green, red) to LEDs (L2, L1 respectively). Example connections are shown in Figure 9:

Figure 9: Step 5 – Output connections.

  1. Finally, test the circuit and its behaviour comprehensively. At a minimum, you should test:
  • Clock inputs with no pedestrian button input (traffic lights should not change)
  • Clock inputs with a pedestrian button input (traffic light should advance)
  • Holding pedestrian button and not holding pedestrian button during car yellow light (outputs of each should not be different.)
  • Forcing flip-flops into an unexpected/undefined state using the SET inputs. This should transition safely to a state defined as per Part A1.

Submission Process

Your submission should include a zipped folder (a .zip file only, not any other format such as .rar or .7z) containing your response as follows.

Please submit a zip file containing:

  • A .pdf file containing your solution for Part A and your name and student number. This can be either electronically typeset or handwritten and scanned.
  • Logisim circuit files for Part A1 and A2 named as partA1 xxxxxxxx.circ and partA2 xxxxxxxx.circ,where xxxxxxxx is your 8-digit student number.
  • A picture of your circuit for Part B including your student ID card, clearly showing your student number (.png or .jpg/.jpeg only) and circuit.
  • A video (not more than 5 minutes long) showing the required functionality of your circuit for Part B.

This single zip file you submit must be named as A1 xxxxxxxx.zip, where xxxxxxxx is your 8-digit student number, and should be submitted electronically to Blackboard according to the exact instructions listed on the Blackboard website.