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

Tutorial 4 source does not compile #19

Open
izzy-nicholson opened this issue Aug 28, 2018 · 4 comments
Open

Tutorial 4 source does not compile #19

izzy-nicholson opened this issue Aug 28, 2018 · 4 comments

Comments

@izzy-nicholson
Copy link

Running arachne on counter.v from tutorial 4 (the 26 bit counter) results in a fatal error due to missing set_io constraints. The counter.v file contains:

module counter(input clk, output [25:0] data);

while the .pcf contains only pin destinations for the first four bits:

set_io data[25] 96
set_io data[24] 97
set_io data[23] 98
set_io data[22] 99
set_io clk 21

Leading to arachne throwing up a fatal error: Missing 22 set_io constraints.

@IsraelLencina
Copy link

Same error, doesn't work.

@profeBlanco
Copy link

vh
estoy teniendo este error al sintetizar, creo que el archivo divider.vh lo estoy poniendo en una carpeta equivocada por eso no me lo puede abrir. que sugieren subo la foto

@nilBaltimore
Copy link

Running arachne on counter.v from tutorial 4 (the 26 bit counter) results in a fatal error due to missing set_io constraints. The counter.v file contains:

module counter(input clk, output [25:0] data);

while the .pcf contains only pin destinations for the first four bits:

set_io data[25] 96
set_io data[24] 97
set_io data[23] 98
set_io data[22] 99
set_io clk 21

Leading to arachne throwing up a fatal error: Missing 22 set_io constraints.

Buenas, parece que al utilizar un bus de 26 bits, en el fichero pcf se debe identificar todos los pines para los 26 bits...una opción para ver lo que Obijuan propone podría ser así:

module counter (input clk, output [3:0] data);
reg [3:0] data;
wire clk;
reg[25:0] aux;

always @ (posedge clk) begin
aux <= aux + 1;
data[3] <= aux[25];
data[2] <= aux[24];
data[1] <= aux[23];
data[0] <= aux[22];

end
endmodule // counter

set_io data[3] 96
set_io data[2] 97
set_io data[1] 98
set_io data[0] 99
set_io clk 21

@samek-h
Copy link

samek-h commented Sep 22, 2020

This could be a problem of arachne-pnr which doesn't seem to allow unconstrained I/O (data [21:0]) in the top-level module (counter).

IMHO the best solution would be to migrate to nextpnr in all Makefiles (sigh) since arachne-pnr is not maintained anymore. And for the sake of simplicity then just allow the usage of unconstrained ports with nextpnr.

Example of changes in Makefile in order to use nextpnr (also targets like e.g. clean should use the new file names):

#------------------------------
#-- Sintesis completa
#------------------------------
$(NAME).bin: $(NAME).pcf $(NAME).v 
	
	#-- Sintesis
	yosys -p "synth_ice40 -top $(NAME) -json $(NAME).json" $(NAME).v
	
	#-- Place & route
	nextpnr-ice40 --hx1k --package tq144 --json $(NAME).json --pcf $(NAME).pcf --asc $(NAME).asc --pcf-allow-unconstrained
	
	#-- Generar binario final, listo para descargar en fgpa
	icepack $(NAME).asc $(NAME).bin

Note the --pcf-allow-unconstrained option, which when ommited results in this error:

ERROR: IO 'data[0]' is unconstrained in PCF (override this error with --pcf-allow-unconstrained)

...at least more clear than in arachne-pnr case.

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

No branches or pull requests

5 participants