Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Urgent :)

Hi everyone, for a project I was given my specs.

'Implement a shifter with combinational logic than can carry out the following tasks. The shifters functionality should be verified with a ModelSim testbench'.

Control 0: 4-bit value will be shifted left by the number of places specified by a 2-bit value

Control 1: 4-bit value will be rotated right by the number of places specified by a 2-bit value.

Havent a clue, so if anyone knows a similar program, do tell

Cheers.

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    well you have 3 inputs.

    a 4 bit output value

    a 2 bit "shift by X value

    and an direction bit

    I would have thought that was pretty self explanitory - exactly what are you stuck on?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Well we hardly have got an introduction to vhdl at all. Like we've only been at it for 2 weeks and he gives us a assignment like that, I haven't a clue even really on how to start it. So I'm stumped for every section!

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I suggest getting a good VHDL tutorial or text book (dont you have libraries on campus)?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Try drawing a circuit diagram on paper using and/or/nor/etc. gates. It should get you close if you are using schematic entry.

    Otherwise, if you are programming in VHDL or Verilog, look for a good template to start with. I do agree with Tricky though, a good book is a wonderful thing.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yeah a book is a great thing but ive left it sort of late haha. Due today.

    if anyone has a code, you know where i am lol