Homework 2 FAQ

CS3410 Spring 2011

Due: Friday, February 18 2011, 11:59pm


Q: What is the input 'sel'?
A:Sel could be anything that let you choose the value to output correctly. You can think of it as the current disparity, which is an input to the datapath and output from the FSM.

Q: On Reset_n
A: Reset_n reset the circuit to initial state. We should assume that, the reset_n is active low. This means that when the reset_n signal is 1 when your circuit is operational. When you set the reset_n signal to zero, the register in FSM is reset to '-1' state. NOTE: If you already have the reset_n signal works in the opposite manner, 'active high', try insert a 'NOT' gate to flip the reset signal.

Q: How many flip-flops do we need?
A:If you decided to use register, no flip-flop is needed for this homework, because the register here is basically a 1-bit flip-flop.

Q: How does a ROM work?
A: Please refer to http://ozark.hendrix.edu/~burch/logisim/docs/2.3.0/libs/mem/rom.html.

Q: On Lookup tables in HW2.
A: Our assignment specification suggests that you use a lookup table for homework 2. There are two basic ways to do this. One is (IMHO) far easier than the other.

The first method is a multiplexer with constant inputs. This way's kind of cumbersome because you probably have to type in all the constant values by hand and things can get kind of cramped. And you can't do it with a script unless you do some messing with your .circ file's XML

The method I prefer is located in the folder called Memory: the ROM. With a rom, you have an input, the address, and it outputs the contents of the memory at the specified address. The ROM is handy because it can take a text file as input and automatically set the contents of the memory. To see this in action, place a ROM in your circuit, make its address bit width 4 and its data bit width 8. Then right click (control click for Macs) on it, and choose Load Image, and give it this file:

http://www.csuglab.cornell.edu/~pht24/cs3410/example-rom-image.txt

You'll see that some numbers appear in the ROM. What's more, these numbers correspond to the numbers in the file I gave. In general, the file begins with "v2.0 raw", then has any white space between consecutive values. Values appear in consecutive order.

Q: Do I need to flip the order of bits in output?
A: This is better explained using an example. Let's say you have 000 00000 as an input, that is, HGF EDCBA. H is data_in[7], A is data_in[0]. The output can be either 100111 0100 or 011000 1011, abcedi_fghj. NOTE: We should agree that the 'j' bit will be the data_out[0], 'a' bit is data_out[9].

Q: Is it possible to do test vector using clock? A: If you are asking about the clock component. I don't believe there is something that will cause the clock to tick in a test vector, so you'd have to have the clock be an input and have it tick that way.