VHDL for comparator

Discussion in 'Homework Help' started by Predador, May 22, 2008.

  1. Predador

    Thread Starter New Member

    May 22, 2008
    7
    0
    i ned to make an VHDL of the behavior of this comparator
    [​IMG]
    can enibody help me...

    any recommendation of a good program to write and to test VHDL?
     
    Last edited: May 22, 2008
  2. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    Quartus II from Altera.
    The download is almost 1GB so it will test your patience and your broadband connection.
     
  3. Predador

    Thread Starter New Member

    May 22, 2008
    7
    0
    i am triing Active-HDL 7.2SE to help me for this work
    yoiu think is good?
     
  4. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
    I've never heard of Active-HDL, but concur with Papabravo's suggestion of Quartus II. Another alternative is ISEPack by Xilinx and test via ModelSim.

    Dave
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    I'm unfamiliar with that package, so I can't comment.
     
  6. Predador

    Thread Starter New Member

    May 22, 2008
    7
    0
    i am having an hard time with this work
    1st i don't find what kind of comparator i am diling with.
    2nd i need to describe the beavior of this comparator in VHDL (i am not familiar with)
    3- i need to write an “testbench” in VHDl
    it is very hard with 2 classes of VHDL laguage to do it.
    can enibody put me in the right way...
    i am so:confused:


    thank you all for your help
    sorry for my bad english...

    i found this code seems to be like the one i need
    complet document
     
    Last edited: May 23, 2008
  7. aiken

    New Member

    May 23, 2008
    3
    0
    1.use AND, OR,XOR gate to "draw" the circuit first!! Remember you are now doing digital design.
    2. Find from your notes or internet: how to write vhdl code for AND OR XOR gate then you should write your design by vhdl
    3. use ISE is better than Atlera one, becuase ISE support Testbench for simulation.
    4. If you want to write test bench faster, I will suggest you use Actel tools (because they use GUI interface to input signal and output vhdl code testbench for you
     
  8. Predador

    Thread Starter New Member

    May 22, 2008
    7
    0
    thank you all for your patience...

    whitch one of the ISE products you recomend, they ar very havy...
    and from actel
     
    Last edited: May 23, 2008
  9. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    The behavioral description would look something like
    Code ( (Unknown Language)):
    1.  
    2. BEGIN
    3.  PROCESS (a,b)
    4.  BEGIN
    5.   IF    a<b THEN
    6.          result <= "001";
    7.   ELSIF a=b THEN
    8.          result <= "010";
    9.   ELSIF a>b THEN
    10.          result <= "100";
    11.   ELSE
    12.          result <= "000";
    13.   END IF;
    14.   agb <= result(2);
    15.   aeb <= result(1);
    16.   alb <= result(0);
    17.  END PROCESS;
    18.  
    A behavioral description has some advantages over the structural when you are just getting started.
     
  10. Predador

    Thread Starter New Member

    May 22, 2008
    7
    0
    thank you for the tip Papabravo

    i hav dond it an little bit mor complex but i thinc it works
     
    Last edited: May 24, 2008
Loading...