~ruther/verilog-riscv-semestral-project

ref: a400aceb574400fad6b269927793a5c13aab647c verilog-riscv-semestral-project/programs/branches.c -rwxr-xr-x 468 bytes
a400aceb — Rutherther feat: make RAM word aligned, add byte_enable 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
void main()
{
    int a = 1;
    int b = 5;
    int c = 0;

    if (a < b) {
        c = 1;
    } else {
        c = 2;
    }

    if (a >= b) {
        c = 1;
    } else {
        c = 2;
    }

    if (a != b) {
        c = 1;
    } else {
        c = 2;
    }

    if (a == b) {
        c = 1;
    } else {
        c = 2;
    }

    if (a <= b) {
        c = 1;
    } else {
        c = 2;
    }

    if (a > b) {
        c = 1;
    } else {
        c = 2;
    }

}
Do not follow this link