Connect with us

Basic parts of processor ?

Discussion in 'Electronics Homework Help' started by vead, Nov 15, 2014.

Scroll to continue with content
  1. vead

    vead

    473
    14
    Nov 27, 2011
    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 ?
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
    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 likes this.
  3. vead

    vead

    473
    14
    Nov 27, 2011
    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: Nov 15, 2014
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
    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,
     
  5. vead

    vead

    473
    14
    Nov 27, 2011
    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
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
    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?

    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.
     
    KrisBlueNZ likes this.
  7. vead

    vead

    473
    14
    Nov 27, 2011
    instruction is 4 bit means
    0001 add
    1000 and

    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 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
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
    That's not an entire instruction. How does it know (in the first case) what to add?

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

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

    Get the understanding first.

    OK, so stop wasting your time postulating designs until you have that understanding.
     
    Allen Bong and KrisBlueNZ like this.
  9. vead

    vead

    473
    14
    Nov 27, 2011
    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
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
     
    vead likes this.
  11. vead

    vead

    473
    14
    Nov 27, 2011
    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: Nov 16, 2014
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,500
    2,840
    Jan 21, 2010
    See my answer in post #10
     
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 (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-