| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- `include "comp.sv"
- `include "sigmoid.sv"
- `include "neuron.sv"
- `include "layer.sv"
- module neural_adder(clk, rst, x0, x1, y);
- input clk, rst;
- input [31:0] x0, x1;
- output [31:0] y;
- floating_add#(.N(32), .M(8)) add0(
- .input_1(x0),
- .input_2(x1),
- .sum(y),
- .diff(),
- .clk(clk),
- .reset(rst)
- );
- endmodule : neural_adder
- module neural_mult(clk, rst, x0, x1, y);
- input clk, rst;
- input [31:0] x0, x1;
- output [31:0] y;
- floating_product#(.N(32), .M(8)) mul0(
- .input_1(x0),
- .input_2(x1),
- .product(y),
- .clk(clk),
- .reset(rst)
- );
- endmodule : neural_mult
- module neural_comp_gt(x0, x1, y);
- input [31:0] x0, x1;
- output y;
- fpu32_gt gt0(x0, x1, y0);
- endmodule : neural_comp_gt
- module neural_comp_lt(x0, x1, y);
- input [31:0] x0, x1;
- output y;
- fpu32_lt lt0(x0, x1, y0);
- endmodule : neural_comp_lt
|