help in cpu design

P

Pieter Hulshoff

I'm working a very-very simple cpu design but it doesnt work. The
problem : the address signal never changed but I dont understand why.

For starters: the address is set in two different processes. This is asking
for trouble. :) The same goes for program_counter. Anothing thing I noticed
that no matter what instruction(0 TO 4) is, program_counter is always set
to data in your read_data process.

Regards,

Pieter Hulshoff
 
A

Attila Csosz

Thanks

The main problem : the "read_mem" process of "simple_mem" is never
triggered by "Address". Why? I debugging this with Active-HDL and when I
stepped in the "read_mem" process( triggered by "clk" ) the "Address" is
always "U" but I dont understand why. So "top_A" is "U" during then
simulation.



Pieter said:
For starters: the address is set in two different processes. This is asking

I think this maybe not problem because the "read_instruction" process
read a cpu instruction and if other data need (like jmp) the "read_data"
reads it in and it guarded with "( more_fetch = '1' )".
for trouble. :) The same goes for program_counter. Anothing thing I noticed
that no matter what instruction(0 TO 4) is, program_counter is always set
ok

to data in your read_data process.

Regards,

Pieter Hulshoff

Thanks for your help
Attila
 
P

Pieter Hulshoff

I think this maybe not problem because the "read_instruction" process
read a cpu instruction and if other data need (like jmp) the "read_data"
reads it in and it guarded with "( more_fetch = '1' )".

I think you may be used to writing software (which is how I started too:).
There's no such thing as 'doing nothing' in hardware. Closest you can come
to that is 'keep your current value'. Hence, two processes driving the same
signal will cause trouble unless you're defining a bus with multiple
drivers. As you are not, avoid driving signals from multiple processes, for
if you do your design will not work properly.

Regards,

Pieter
 
A

Attila Csosz

Thanks, I redesign the processes and now the address maybe correct. My
new problem : the top_Ready signal never changes I dont understand why
:) Maybe like the previous problem but I dont know.. and how to change
to work.

http://web.axelero.hu/csosz33/cpu_comp.txt


Thanks for your help
Attila
 
P

Pieter Hulshoff

Thanks, I redesign the processes and now the address maybe correct. My
new problem : the top_Ready signal never changes I dont understand why
:) Maybe like the previous problem but I dont know.. and how to change
to work.

Well, I personally would use port BUFFER i.s.o. INOUT, but the most likely
reason for your top_Ready not changing is that the Ready output of your
design (to which top_Ready is connected) is driven by two processes. So
yes, it is exactly like the previous problem. :)

Regards,

Pieter Hulshoff
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top