Beginner Help

L

Linas Petras

Guest
Just wondered if anyone who be so kind to translate the following bit of
psuedo verilog to vhdl.

As I've just started VDHL, trying to understand Verilog is just a bit much
for me :-(

Linas

PS This is NOT a school project
--------------------------------------------------------------
SUBDESIGN glue
(
pci_clk, LP_RW, nCS : INPUT;
nRE, nWE : OUTPUT;
)

VARIABLE
Q[2..0] : DFF;

BEGIN
Q[].clk = pci_clk;
Q[].prn = NOT nCS;
Q[0].d = nCS;
Q[1].d = Q[0].q;
Q[2].d = Q[1].q;
nRE = nCS OR NOT LP_RW OR NOT Q[2].q;
nWE = nCS OR LP_RW OR NOT Q[1].q;
END

---------------------------
 
Linas,
Looks more like AHDL to me with three registers in the design.
Don't know AHDL well, but this is what I think I see.

.clk = pci_clk; --- Clock for all registers
Q[].prn = NOT nCS; --- set for all registers / ?Sync or Async?
Q[0].d = nCS; --- Input to register 0 gets nCS
Q[1].d = Q[0].q; --- Input to register 1 gets output from register 0
Q[2].d = Q[1].q; --- Input to register 2 gets output from register 1
-- Logic. Q[1].q and Q[2].q are the outputs of registers 1 and 2 respectively.
.q;
nWE = nCS OR LP_RW OR NOT Q[1].q;
Have Fun.

Jim



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
"Dan RADUT" <dradut@golden.net> wrote in message
news:b647fde8.0409241446.40817b91@posting.google.com...
Hi Linas:

A VHDL translation of your code could be this one:

..... stuff deleted .....
Dan,

Many thanks, I'll use this as the starting point.

Linas
 

Welcome to EDABoard.com

Sponsor

Back
Top