designing the control unit of a processor with interupt

M

mohammed rafi

Guest
Hello everybody,
I am a beginer and i am writing the RTL code for a 16 bit
processor with 2 interupts.
I have completed the RTL design for the ALU, stack, registerfile, PC
and memory. Now i have to design the control unit. All I know about
the control unit is that it is an FSM.
Can you give me some suggestions regarding it, especially deriving
the state diagram fo the control unit. Any links to RTL design will be
useful.
 
MohammedRafi,
The best way to approach a FSM desing is to complete the desing on
paper
with a state diagram, defining the inputs and outputs at each stage.
Once you have completely described all its state then you can start
writing your RTL. This mainly helps in avoiding rough code written
when you come across certain coditions you missed and so on. So
firstly make the desing solid on paper.
Every state machine design contains two always blocks. One block for
the clocking and the other block for the combinatorial logic that
occurs in each state..

ex.
always @( posedge clk or negedge reset )
begin
....
...
present_state = next_state;
end


always @( present_state or any conditions ( ex maybe u'r
interrupts etc ) )
begin

state 1:
state 2:
...
..
default : ..
end

this is a basic framework of a state machine in RTL..
hope this helps..
regarding books or links.. i think hdl synthesis - j bhasker should
help..
sachin




m_mohammedrafi@yahoo.com (mohammed rafi) wrote in message news:<977f64b1.0405080102.75f3bad@posting.google.com>...
Hello everybody,
I am a beginer and i am writing the RTL code for a 16 bit
processor with 2 interupts.
I have completed the RTL design for the ALU, stack, registerfile, PC
and memory. Now i have to design the control unit. All I know about
the control unit is that it is an FSM.
Can you give me some suggestions regarding it, especially deriving
the state diagram fo the control unit. Any links to RTL design will be
useful.
 
m_mohammedrafi@yahoo.com (mohammed rafi) wrote in message news:<977f64b1.0405080102.75f3bad@posting.google.com>...
Hello everybody,
I am a beginer and i am writing the RTL code for a 16 bit
processor with 2 interupts.
I have completed the RTL design for the ALU, stack, registerfile, PC
and memory. Now i have to design the control unit. All I know about
the control unit is that it is an FSM.
Can you give me some suggestions regarding it, especially deriving
the state diagram fo the control unit. Any links to RTL design will be
useful.
Wow you picked the best part to do last.

It seems you may be in need of a text on computer design that goes
into all the details.

Some of the Verilog texts and no doubt some VHDL texts describe
designing simple cpus using those languages with code examples. I
can't recall authors but Amazon should have descriptions of the
current books.

For real computer design I would suggest the
Hennesy and D. Paterson. Computer Architecture:
A Quantitative Approach. Morgan-Kaufmann,

book and there are plenty more that get into real detail but they
don't give you HDL code.

So what is your instruction set, yours or an oldy?

regards

johnjakson_usa_com
 

Welcome to EDABoard.com

Sponsor

Back
Top