Can you give some idea about the question?

Discussion in 'VHDL' started by zidong, Oct 5, 2010.

  1. zidong

    zidong Guest

    Design a circuit that has the following function:

    If C=00: shift A one step to the left (“shift in” ’0’ on LSB)

    If C=01: shift A one step to the right (“shift in” ’0’ on MSB)

    If C =10: rotate A one step left

    If C=11: rotate A one step right

    Input: A (std_logic_vector(7 downto 0))

    C (std_logic_vector(1 downto 0)

    Output: Z (std_logic_vector(7 downto 0)) – the result of the shifting
    or rotation of

    A

    thanks in advance.
     
    zidong, Oct 5, 2010
    #1
    1. Advertising

  2. zidong

    Tricky Guest

    On 5 Oct, 07:10, zidong <> wrote:
    > Design a circuit that has the following function:
    >
    > If C=00: shift A one step to the left (“shift in” ’0’ on LSB)
    >
    > If C=01: shift A one step to the right (“shift in” ’0’ on MSB)
    >
    > If C =10: rotate A one step left
    >
    > If C=11: rotate A one step right
    >
    > Input: A (std_logic_vector(7 downto 0))
    >
    > C (std_logic_vector(1 downto 0)
    >
    > Output: Z (std_logic_vector(7 downto 0)) – the result of the shifting
    > or rotation of
    >
    > A
    >
    > thanks in advance.


    Heres a good start:

    library ieee;
    use ieee.std_logic_1164.all;

    entity some_bloke_on_the_internet_did_my_assignment_for_me is
    port (
    A : in std_logic_vector(7 downto 0);
    C : in std_logic_vector(1 downto 0);

    Z : out std_logic_vector(7 downto 0)
    );
    end entity some_bloke_on_the_internet_did_my_assignment_for_me;

    architecture I_wrote_this_bit of
    some_bloke_on_the_internet_did_my_assignment_for_me is
    begin
    --place your code here - come back when you get stuck
    end architecture I_wrote_this_bit;
     
    Tricky, Oct 5, 2010
    #2
    1. Advertising

  3. zidong

    Andy Guest

    I think it is a very nice question.

    Andy
     
    Andy, Oct 5, 2010
    #3
  4. zidong

    KJ Guest

    On Oct 5, 9:30 am, Andy <> wrote:
    > I think it is a very nice question.
    >
    > Andy


    Except for the subject line, I didn't see any question. A bait-and-
    switch from my view. But maybe a question could have been a very nice
    question. I wonder if the OP is simulating new dance moves?

    KJ
     
    KJ, Oct 5, 2010
    #4
  5. zidong

    backhus Guest

    On 5 Okt., 17:07, KJ <> wrote:
    > On Oct 5, 9:30 am, Andy <> wrote:
    >
    > > I think it is a very nice question.

    >
    > > Andy

    >
    > Except for the subject line, I didn't see any question.  A bait-and-
    > switch from my view.  But maybe a question could have been a very nice
    > question.  I wonder if the OP is simulating new dance moves?
    >
    > KJ


    Hi KJ,
    dance move generator, what a brilliant idea!
    Take four of these connected to random generators (two legs * x/y
    position),
    and don't forget the twister(tm)-detector to avoid impossible moves.
    With some input (3x3 step mat) and output stuff(3x3 LED) you can put a
    dance game into a single CPLD.

    More simple minds would suspect this assignment to be an
    implementation of the shift execution block of some simple processor
    core.
    The two bits of C could be part of the opcode, so all rotate/shift
    commands can use a common opcode, that differs only by these two bits.
    But how boring sounds that.... :)


    Have a nice synthesis
    Eilert
     
    backhus, Oct 8, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. senthil
    Replies:
    0
    Views:
    622
    senthil
    Nov 21, 2003
  2. davidw
    Replies:
    0
    Views:
    511
    davidw
    Feb 8, 2006
  3. Jerry Coffin

    hi can give me idea

    Jerry Coffin, Sep 18, 2007, in forum: C++
    Replies:
    11
    Views:
    633
    osmium
    Sep 19, 2007
  4. Bruno Desthuilliers

    Can you please give me some advice?

    Bruno Desthuilliers, Sep 29, 2007, in forum: Python
    Replies:
    16
    Views:
    607
    Dennis Lee Bieber
    Oct 3, 2007
  5. Anindya
    Replies:
    4
    Views:
    424
    Arne Vajhøj
    Apr 13, 2008
Loading...

Share This Page