module blocking_cond (in, out); input in; output reg out; reg tmp; always @* begin tmp = 1; out = 1'b0; case (1'b1) tmp: out = in; endcase tmp = 0; end endmodule // ------------------------------------------------------------- module uut(clk, arst, a, b, c, d, e, f, out1); input clk, arst, a, b, c, d, e, f; output reg [3:0] out1; always @(posedge clk, posedge arst) begin if (arst) out1 = 0; else begin if (a) begin case ({b, c}) 2'b00: out1 = out1 + 9; 2'b01, 2'b10: out1 = out1 + 13; endcase if (d) begin out1 = out1 + 2; out1 = out1 + 1; end case ({e, f}) 2'b11: out1 = out1 + 8; 2'b00: ; default: out1 = out1 + 10; endcase out1 = out1 ^ 7; end out1 = out1 + 14; end end endmodule // ------------------------------------------------------------- // extracted from ../asicworld/code_hdl_models_uart.v // (triggered a bug in the proc_mux pass) module uart (reset, txclk, ld_tx_data, tx_empty, tx_cnt); input reset; input txclk; input ld_tx_data; output reg tx_empty; output reg [3:0] tx_cnt; always @ (posedge txclk) if (reset) begin tx_empty <= 1; tx_cnt <= 0; end else begin if (ld_tx_data) begin tx_empty <= 0; end if (!tx_empty) begin tx_cnt <= tx_cnt + 1; end end endmodule /a>summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/arm_atsam/usb/main_usb.c
blob: 0f676ab639d95d3335e40da0e32d680210cd3816 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132