Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing failure on MachXO3 #1236

Open
povik opened this issue Nov 7, 2023 · 4 comments
Open

Routing failure on MachXO3 #1236

povik opened this issue Nov 7, 2023 · 4 comments

Comments

@povik
Copy link
Member

povik commented Nov 7, 2023

On nextpnr 4a7e58a, trellis 36c615, trellis-db 4dda149 I got the following

Info: Routing globals...
ERROR: Failed to route net 'clk$TRELLIS_IO_IN$glb_clk' from X24/Y15/G_CLKO1_DCC to X4/Y4/CLK1_SLICE using dedicated routing.
0 warnings, 1 error

when routing a simple design with a registered multiplier

read_verilog <<EOF
module top(input [16:0] a, input [16:0] b, output reg [33:0] o, input clk);
	reg [16:0] ar;
	reg [16:0] br;

	always @(posedge clk) begin
		ar <= a;
		br <= b;
		o <= $signed(ar) * $signed(br);
	end
endmodule
EOF
synth_lattice -family xo3 -json multest.json
exec -- nextpnr-machxo2 --json multest.json --device=LCMXO3LF-9400C-6BG484C

If I increase the dimension of the multiplier, the routing stops failing, which suggests to me this is a bug in nextpnr. Attaching logs and the JSON result of synthesis.

log.txt
multest.json

@gatecat
Copy link
Member

gatecat commented Nov 7, 2023

@mmicko I would guess this a problem with some clock routing resources being missing so some DCCs aren't working properly, would you be able to look into this?

@mmicko
Copy link
Member

mmicko commented Nov 7, 2023

Problem occurs when there are no constraints, so promote_globals work fine and add DCC and route trough it, but later place_globals fails, since there are no constraints (BEL attribute).

@gatecat
Copy link
Member

gatecat commented Nov 7, 2023

Can we make the global placement robust enough that it works even in this case? I imagine the same case of unconstrained position would occur e.g. with a global driven from a fabric clock divider (sure, often bad practice, but still sometimes useful).

@mmicko
Copy link
Member

mmicko commented Nov 7, 2023

Ah. Missed the comment. Will need to think more about possible solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants