Maker Pro
Maker Pro

Logic Design ROM Design QUESTION please help

muyeas

May 25, 2020
2
Joined
May 25, 2020
Messages
2
Two teachers (A, B) will grade two questions in an exam. Teacher A will grade question 1 which is 60 points. Teacher B will grade question 2 which is 40 points. Teachers can give the points as below: Teacher A -> 0, 20, 40, 60 Teacher B -> 0, 20, 30, 40
If a student takes 60 or more, he/she will be successfull. Design the circuit by using ROM
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
Ok, so where are you stuck?
Maybe coding the inputs? Are you allowed to simplify the inputs?
Using a ROM to implement logic, I guess must be part of your course?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,760
Joined
Nov 17, 2011
Messages
13,760
Input to the ROM are the teachers' points.
Output of the ROM can be either a total grade (you'd then have to make the pass/fail decision based on the total grade) or output can be a single bit showing pass or fail.
In any case you need to decide how to code the inputs and outputs (as @Nanren888 already mentioned).
You the build a logic table representing inputs vs. output(s) and implement this table into a ROM.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,760
Joined
Nov 17, 2011
Messages
13,760
The truth table has 2 inputs, one for each teacher: input A, input B.
  1. Each input is for example 2 bits wide, sufficient to encode the 4 possible grades. Another encoding would use 4 bits per teacher to encode each possible grade by a 1 hot code. Many other forms of encoding are possible, it is up to you to chose the most efficient one.
  2. The truth table has 1 output to signal the outcome, the total grade.
    Again you can chose different encodings and it is up to you to chose a "good" code.
    For example you could have 1 1 bit output signalling just pass/fail. Or you could have a multi-bit output giving the total grade (sum of input grades), Again different codes like binary, 1 hot or others can be used. It will then be left to a seond circuit to evaluate pass/fail from the coded total grade.

The required matrix is built by putting the inputs of teacher A to the left of a matrix as row indices, the inputs of teacher B on top of the matrix as column indices. In each cell of the matrix write the result according to your encoding chosen in above step 2.
Treat the inputs as ROM addresses, the associated output as ROM data and you are done.

Of course there are certainly many other ways to solve the task, This is just one, my personal interpretation. What counts in the end is that you have a list of addresses and associated data outputs.
 
Top