mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Added examples/gowin/
This commit is contained in:
		
							parent
							
								
									ef603c6fe1
								
							
						
					
					
						commit
						84badc97b3
					
				
					 6 changed files with 57 additions and 0 deletions
				
			
		
							
								
								
									
										6
									
								
								examples/gowin/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								examples/gowin/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
demo.bit
 | 
			
		||||
demo.out
 | 
			
		||||
demo.rpt
 | 
			
		||||
demo_syn.v
 | 
			
		||||
demo_out.v
 | 
			
		||||
demo_tr.html
 | 
			
		||||
							
								
								
									
										17
									
								
								examples/gowin/README
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								examples/gowin/README
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
Simple test project for Gowinsemi GW2A-55K Eval Board Mini.
 | 
			
		||||
 | 
			
		||||
Follow the install instructions for the Gowinsemi tools below,
 | 
			
		||||
then run "bash run.sh" in this directory.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Install instructions for gowinTool_linux
 | 
			
		||||
----------------------------------------
 | 
			
		||||
 | 
			
		||||
1.) extract gowinTool_linux.zip
 | 
			
		||||
 | 
			
		||||
2.) set GOWIN_HOME env variable to the full path to the
 | 
			
		||||
gowinTool_linux directory
 | 
			
		||||
 | 
			
		||||
3.) edit gowinTool_linux/bin/gwlicense.ini. Set lic="..." to
 | 
			
		||||
the full path to the license file.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										17
									
								
								examples/gowin/demo.cst
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								examples/gowin/demo.cst
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
IO_LOC "clk"    D11;
 | 
			
		||||
IO_LOC "led1"   D22;
 | 
			
		||||
IO_LOC "led2"   E22;
 | 
			
		||||
IO_LOC "led3"   G22;
 | 
			
		||||
IO_LOC "led4"   J22;
 | 
			
		||||
IO_LOC "led5"   L22;
 | 
			
		||||
IO_LOC "led6"   L19;
 | 
			
		||||
IO_LOC "led7"   L20;
 | 
			
		||||
IO_LOC "led8"   M21;
 | 
			
		||||
IO_LOC "led9"   N19;
 | 
			
		||||
IO_LOC "led10"  R19;
 | 
			
		||||
IO_LOC "led11"  T18;
 | 
			
		||||
IO_LOC "led12"  AA22;
 | 
			
		||||
IO_LOC "led13"  U18;
 | 
			
		||||
IO_LOC "led14"  V20;
 | 
			
		||||
IO_LOC "led15"  AA21;
 | 
			
		||||
IO_LOC "led16"  AB21;
 | 
			
		||||
							
								
								
									
										1
									
								
								examples/gowin/demo.sdc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								examples/gowin/demo.sdc
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
create_clock -name clk -period 20 -waveform {0 10} [get_ports {clk}]
 | 
			
		||||
							
								
								
									
										11
									
								
								examples/gowin/demo.v
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								examples/gowin/demo.v
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
module demo (
 | 
			
		||||
	input clk,
 | 
			
		||||
	output led1, led2, led3, led4, led5, led6, led7, led8,
 | 
			
		||||
	output led9, led10, led11, led12, led13, led14, led15, led16
 | 
			
		||||
);
 | 
			
		||||
	localparam PRESCALE = 20;
 | 
			
		||||
	reg [PRESCALE+3:0] counter = 0;
 | 
			
		||||
	always @(posedge clk) counter <= counter + 1;
 | 
			
		||||
	assign {led1, led2, led3, led4, led5, led6, led7, led8,
 | 
			
		||||
	        led9, led10, led11, led12, led13, led14, led15, led16} = 1 << counter[PRESCALE +: 4];
 | 
			
		||||
endmodule
 | 
			
		||||
							
								
								
									
										5
									
								
								examples/gowin/run.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								examples/gowin/run.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
set -ex
 | 
			
		||||
yosys -p "synth_gowin -top demo -vout demo_syn.v" demo.v
 | 
			
		||||
$GOWIN_HOME/bin/gowin -d demo_syn.v -cst demo.cst -sdc demo.sdc -p GW2A55-PBGA484-6 \
 | 
			
		||||
		-warning_all -out demo_out.v -rpt demo.rpt -tr demo_tr.html -bit demo.bit
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue