#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    12
    Rep Power
    0

    I am new to operating system and i got some Questions about pipeling


    Firstly ,the question we have A processor has 24 registers*, uses 8-bit immediate*, and has 36 different instructions* (corresponding to 36 operation codes**) in its instruction set.These 36 instructions are classified into 4 types as listed belowi just going to give out type c)


    Type-C: takes 1 source register, 1 immediate, uses 1 destination register;

    i know how to do this but the problem here is i don't know how many bit do 24 registers and 36 opcode require

    (? = unknown)
    i know the answer will be ?opcode+ ?registers + 8bits immediates + ?registers = bits

    But i'd like to know how do i calculate the bits require




    Secondly, there's question asking me how much the pipeline speedup ratio:
    Code:
    Assume a pipelined processor operates in four states: instruction fetch (IF), operand fetch (OF), operand execute (OE), and operand store (OS). A timing diagram of pipeline could be drawn as follows:
    
    we have the following code with the data dependency. 
    
    ADD R1,R3,R2	[R1] ← [R3]+[R2]
    SUB R4,R1,R5	[R4] ← [R1]-[R5]
    MUL R6,R7,R8	[R6] ← [R7]*[R8]
    
    
    This is the table :
    Cycle                  0 cycle 1 cycle 2 cycle 3 cycle 4 cycle 5 cycle 6 ......
    IF
    ADD R1,R2,R3            IF         OF          OE       OS      
    
    ADD  
    R1,R3,R2                               IF            OF        OE     OS
    
    SUB
    R4,R1,R5                                              IF         OF      OE      OS
    
    MUL
    R6,R7,R8                                                           IF       OF      OE      OS
    And this is all the information i get , but i don't know how many instruction in here also i don't know the Clock speed, how can i bring out the speed up ratio?


    Many thanks for reply or view
    my lecturer never reply my e-mail sigh...
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    erm....


    I think is correct I'm not too sure but this is what I have done. Basically if the register was 32 it would be 2^5 and if the instructions were 64 it would 2^6
    so for c it would be:

    6opcode+ 5registers + 8bits immediates + 5registers = 24bits/3bytes

    If the numbers don't fit in base two exactly e.g 36 doesn't but
    the closest to it is 2^5 we use that

    Also if you get say 21bits you round it up to 24bits so its 3bytes bits should always be divided by 8.


IMN logo majestic logo threadwatch logo seochat tools logo