.gitignore Updated
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,9 @@
|
||||
.history
|
||||
.metals
|
||||
.bloop
|
||||
.scalafmt.conf
|
||||
*.code-workspace
|
||||
target
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
27
GCD.sv
27
GCD.sv
@ -1,27 +0,0 @@
|
||||
// Generated by CIRCT firtool-1.62.0
|
||||
module GCD(
|
||||
input clock,
|
||||
reset,
|
||||
input [15:0] io_value1,
|
||||
io_value2,
|
||||
input io_loadingValues,
|
||||
output [15:0] io_outputGCD,
|
||||
output io_outputValid
|
||||
);
|
||||
|
||||
reg [15:0] x;
|
||||
reg [15:0] y;
|
||||
always @(posedge clock) begin
|
||||
if (io_loadingValues) begin
|
||||
x <= io_value1;
|
||||
y <= io_value2;
|
||||
end
|
||||
else if (x > y)
|
||||
x <= x - y;
|
||||
else
|
||||
y <= y - x;
|
||||
end // always @(posedge)
|
||||
assign io_outputGCD = x;
|
||||
assign io_outputValid = y == 16'h0;
|
||||
endmodule
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user