Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > VHDL > Re: new to vhdl
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 6116 of 6417
Post > Topic >>

Re: new to vhdl

by Tricky <Trickyhead@[EMAIL PROTECTED] > Jun 27, 2008 at 01:12 AM

I think Mike pointed out all the problems, I thought Id now just get a
little picky with the code :)

You are using clock'event and clk = 1, for your rising edge triggers.
VHDL93 adds two functions "rising_edge(clk)" and "falling_edge(clk)"
that function exactly the same but I think make the code a little more
readable.

> write_ram: process(clk,rst, we)
>  begin
>    if (clk'event and clk ='1') then

You only need to put "clk" in the sensitivity list here, because
output only change on clock events. In a large design, this may slow a
simulation down as it is triggering processes unnessarily.

>rst_gen: process
>  begin
>       wait for 30 ns;
>      rst <= '0';
>  end process rst_gen;

In this process, rst is being assigned to '0' every 30ns. This will
probably not cause a problem, but it does make "rst'transaction" go
high for that single delta. Personally, I would put "wait;" after "rst
<= '0';" to halt the process;
 




 5 Posts in Topic:
new to vhdl
Vandana <nairvan@[EMAI  2008-06-26 08:53:14 
Re: new to vhdl
Mike Treseler <mike_tr  2008-06-26 10:58:11 
Re: new to vhdl
Tricky <Trickyhead@[EM  2008-06-27 01:12:12 
Re: new to vhdl
KJ <kkjennings@[EMAIL   2008-06-27 04:52:07 
Re: new to vhdl
Vandana <nairvan@[EMAI  2008-06-27 06:27:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 14:55:40 CST 2008.