Basic parts of processor ?

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
Hello experts

I need someone to check my work

some part of controller

Instruction is 4 bit
16 instructions
Data is 8 bit
ALU is 8 bit
Program memory is 4x16 bit
Data memory is 8 x 256 bit
4 to 16 Instruction decoder
Program counter 4 bit


Q1.Why ALU is 8 bit ?
Because the data is 8 bit so ALU should be 8 bit

Q2.Why Program memory is 4x16 bit ?
Instruction are 4 bits so program mmory should be 4x16 bit

Q3.Why Data memory is 8 x 256 bit ?
Because data is 8 bit , ALU is 8 bit so data memory should be 8 x 256

Q4.Why 4 to 16 Instruction decoder
To decode for 16 operation I think I need 4 control word so I use 4 to 16 Instruction decoder

Q5. Why Program counter 4 bit ?
4 bit program counter can address 16 instruction

please checkout my work ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
How does one of your instructions address a memory location or hold an 8 bit immediate value?

You don't note that your design is based on a harvard architecture.
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
How does one of your instructions address a memory location or hold an 8 bit immediate value?

.

I have use some processor registers
because ALU can't access program memory directly


I just wanted to confirm that specification that in post #1 is right or wrong ?

Instruction is 4 bit
16 instructions
Data is 8 bit
ALU is 8 bit
Program memory is 4x16 bit
Data memory is 8 x 256 bit
4 to 16 Instruction decoder
Program counter 4 bit

Instruction register 4 bit
address register
general purpose register
accumulator A 8 bit
Data register R1 8 bit
Data register R2 8 bit
Data register R3 8 bit
Data register R4 8 bit

I can use external program and data memory

theoretically I want to know that the specification I have explained in my post is right or wrong ?
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
There's another thread where this sort of stuff is being discussed.

I recommend you read it and try to understand it. Here it is,
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
There's another thread where this sort of stuff is being discussed.

I recommend you read it and try to understand it. Here it is,
that thread I was created for Instruction set and this thread created for just confirmation that the example I created in my post is right or wrong ?

. If you want to continue with one thread its ok . I just want to confirm that the concept is right or wrong
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I think your first line is highly questionable in the context of the rest of your statement.

Instruction is 4 bit

Do you mean the entire instruction fits into 4 bits, or that the instruction is made up of a multiple of 4 bit chunks?

As a minimum, you need to be able to address the entire memory space. Whilst there are multiple ways to do this, including via pointers in registers or memory. Regardless of this, there needs to be a way of dealing with immediate values. How do you intend to do this.

Much of the rest of you statements have similar problems, for example the size of your program space. Does it seem to you to be a tad limited? Given the requirements of an instruction, you would expect to get far fewer than 16 instructions. Even if you could get 16 instructions, you're not going to be able to write useful code in that space.

I do recommend that you go back to the other thread and work on your understanding of the problem before you try to invent a solution.

Your first step would be to understand an assembly language, and understand it to the point that you can convert the mnemonics to the machine code by hand -- i.e. you need to intimately understand how an existing instruction set works.

You've been told this before, but you've ignored the suggestion. If you continue to ignore the advice you're given then people will simply stop giving you advice.
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
I think your first line is highly questionable in the context of the rest of your statement.



Do you mean the entire instruction fits into 4 bits, or that the instruction is made up of a multiple of 4 bit chunks?

.

instruction is 4 bit means
0001 add
1000 and

Much of the rest of you statements have similar problems, for example the size of your program space. Does it seem to you to be a tad limited? Given the requirements of an instruction, you would expect to get far fewer than 16 instructions. Even if you could get 16 instructions, you're not going to be able to write useful code in that space.

I don't care. what I design because I am doing work on paper
Q1.Why ALU is 8 bit ?
If data is 8 bit so ALU should be 8 bit
if data is 4 bit then alu should be 4 bit
if data is 6 bit then alu should be 6 bit
if data is 16 bit then alu should be 16 bit

Q2.Why Program memory is 4x16 bit ?
Instruction are 4 bits so program mmory should be 4x16 bit
Instruction are 8 bits so program mmory should be 8x256 bit
Instruction are 6 bits so program mmory should be 6x64 bit


Q3.Why Data memory is 8 x 256 bit ?
If data is 8 bit , ALU is 8 bit so data memory should be 8 x 256
if data is 4 bit data memory should be 4x16

Q4.Why 4 to 16 Instruction decoder
To decode for 16 operation I think I need 4 control word so I use 4 to 16 Instruction decoder
8 instruction need 3 to 8 decoder
32 instruction need 5 to 32 decoder


Q5. Why Program counter 4 bit ?
4 bit program counter can address 16 instructions
8 bit program counter can address 256 instructions
16bit 4 bit program counter can address around 6500 instructions

here I try to explaining the concept because I am not sure that my method is correct

I do recommend that you go back to the other thread and work on your understanding of the problem before you try to invent a solution.

Your first step would be to understand an assembly language, and understand it to the point that you can convert the mnemonics to the machine code by hand -- i.e. you need to intimately understand how an existing instruction set works.

You've been told this before, but you've ignored the suggestion. If you continue to ignore the advice you're given then people will simply stop giving you advice

I am not ignore your suggestion , as I told in my previous post . I shown in my previous post about assembly code
yes I will go back to other thread I am writing some code on compiler I am learning more about assembly code
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
instruction is 4 bit means
0001 add
1000 and

That's not an entire instruction. How does it know (in the first case) what to add?

I don't care.

You should, because it has to be at least minimally functional.

here I try to explaining the concept because I am not sure that my method is correct

My opinion is that you're trying to design something in the absence of understanding.

Get the understanding first.

I am learning more about assembly code

OK, so stop wasting your time postulating designs until you have that understanding.
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
what do you think about this

Q1.Why ALU is 8 bit ?
If data is 8 bit so ALU should be 8 bit
if data is 4 bit then alu should be 4 bit
if data is 6 bit then alu should be 6 bit
if data is 16 bit then alu should be 16 bit

Q2.Why Program memory is 4x16 bit ?
Instruction are 4 bits so program mmory should be 4x16 bit
Instruction are 8 bits so program mmory should be 8x256 bit
Instruction are 6 bits so program mmory should be 6x64 bit


Q3.Why Data memory is 8 x 256 bit ?
If data is 8 bit , ALU is 8 bit so data memory should be 8 x 256
if data is 4 bit data memory should be 4x16

Q4.Why 4 to 16 Instruction decoder
To decode for 16 operation I think I need 4 control word so I use 4 to 16 Instruction decoder
8 instruction need 3 to 8 decoder
32 instruction need 5 to 32 decoder


Q5. Why Program counter 4 bit ?
4 bit program counter can address 16 instructions
8 bit program counter can address 256 instructions
16bit 4 bit program counter can address around 6500 instructions
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
I am really sorry i am feeling nervous
I tried again to make my post easy


I told you that I was not talking about design
I did explain some reason
everyone say start with basic so I tried in this way

Q. data is 4 bit ?
which alu you should have to use
A . 2 bit ALU
B . 4 bit ALU
C 6 bit ALU
D 8 bit ALU

my answer . B 4 bit alu
reason : data is 4 so I used 4 bit alu . 4 bit alu deal with 4 bit number like 0001+1010
I created this thread for confirmation that my option B is correct or wrong.? and the reason that I have explained is correct or wrong ?
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
See my answer in post #10
 
Top