Skip to content

"bitwise AND" and "bitwise XOR" are not working #18

@hossameldin1995

Description

@hossameldin1995

Hi I synthesised your potato SoC and I tried a "bitwise AND" and "bitwise XOR" and thehre is a bug while execute these operations

This is the "AND" code. In the comment you will find the result that is expected
and_c

This is the simulation of "AND" code on modelsim. You will find at 86988ps alu_x = 0x11, alu_y = 0x5B, and alu_result = 0x11.
alu_x should be 0x31 and this is wrong to be sure I will show you the contents of the memory
the output is right as expected because the alu_x is the result as you will understand in "XOR" code.
and_sim

This is the contents of memory and all is right.
and_mem


This is the "XOR" code. In the comment you will find the result that is expected
xor_c

This is the simulation of "XOR" code on modelsim. You will find at 25754ps alu_x = 0x31, alu_y = 0x5B, and alu_result = 0x6A.
and all is right as expected
but in the second image you will find at 25805ps alu_x = 0x6A, alu_y = 0x5B, and alu_result = 0x31.
alu_x has the result of the previus operation and this is not expected so the output is 0x31.
This output is stored in the memory as it is not right.
xor_sim_1
xor_sim_2

This is the contents of the memory (XOR)
z y x
31 31 5B 00
xor_mem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions