Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
courses:a4m36pap:cviceni2 [2010/10/13 23:30] redtop created |
courses:a4m36pap:cviceni2 [2025/01/03 18:29] (aktuální) |
||
---|---|---|---|
Řádek 2: | Řádek 2: | ||
neručím za správnost, pokud mě doplní, kdo si je jistější budu rád: | neručím za správnost, pokud mě doplní, kdo si je jistější budu rád: | ||
=== 1. === | === 1. === | ||
- | <code> | + | <code verilog> |
module KonecnyAutomat(input x, clk, reset, | module KonecnyAutomat(input x, clk, reset, | ||
output [2:0] y); | output [2:0] y); | ||
Řádek 40: | Řádek 40: | ||
=== 4. === | === 4. === | ||
- | <code> | + | <code verilog> |
module mux2x1(in0, in1, select, out); | module mux2x1(in0, in1, select, out); | ||
input [31:0] in0; | input [31:0] in0; | ||
input [31:0] in1; | input [31:0] in1; | ||
input select; | input select; | ||
- | input [31:0] out; | + | output [31:0] out; |
assign out = select ? in1 : in0; | assign out = select ? in1 : in0; | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module mux3x1(in0, in1, in2, select, out); | module mux3x1(in0, in1, in2, select, out); | ||
input [31:0] in0; | input [31:0] in0; | ||
Řádek 64: | Řádek 64: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module sumator(a, b, suma); | module sumator(a, b, suma); | ||
input [31:0] a; | input [31:0] a; | ||
Řádek 72: | Řádek 72: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module mul4(in, out); | module mul4(in, out); | ||
input [31:0] in; | input [31:0] in; | ||
Řádek 79: | Řádek 79: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module compare(a, b, out); | module compare(a, b, out); | ||
input [31:0] a; | input [31:0] a; | ||
Řádek 87: | Řádek 87: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module extend( | module extend( | ||
input [15:0] in, | input [15:0] in, | ||
Řádek 95: | Řádek 95: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module registr( | module registr( | ||
input [31:0] in, | input [31:0] in, | ||
Řádek 110: | Řádek 110: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module pole( | module pole( | ||
input [4:0] addr0, | input [4:0] addr0, | ||
Řádek 132: | Řádek 132: | ||
endmodule | endmodule | ||
</code> | </code> | ||
- | <code> | + | <code verilog> |
module alu( | module alu( | ||
input [31:0] srcA, | input [31:0] srcA, |