Author Topic: Gowin Simulation  (Read 5267 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Gowin Simulation
« on: June 24, 2020, 10:58:33 am »
Hi,
I have made a board for GW2AR-LV18QN part, And every thing is working as expected and I have written  UART,SPI, PWM peripherals and have tested them successfully.

Now I want to use the IP cores, for example the FIFO one, The problem for now is how can I simulate my design with the Gowin IO cores, using Modelsim etc...

I have found a folder named simlib in the installation folder,

I wonder if anyone in here has done simulation with gowin IP on modelsim or another simulation software, is it possible? how?

Any tips would be highly appreciated.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Re: Gowin Simulation
« Reply #1 on: June 25, 2020, 09:32:37 am »
Does any body use Gowin FPGA's in here?
The tools generate a SDF file, can it be used for simulation? how?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Gowin Simulation
« Reply #2 on: June 25, 2020, 07:08:28 pm »
Does any body use Gowin FPGA's in here?
The tools generate a SDF file, can it be used for simulation? how?

Assuming that Gowin is no different from any other FPGA vendor --

In addition to the SDF file, the Gowin tools should provide a VHDL or Verilog model of the design which replaces your RTL/behavioral code with primitives. So you bring the new model and the SDF into your simulation tool, which needs to be able to do such back-annotated simulation. You use the same test bench as with your original design.

ModelSim and Aldec can do such simulation. I think that ghdl can do it, too.
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Re: Gowin Simulation
« Reply #3 on: June 28, 2020, 07:33:45 am »
thanks, Do you have any web link or tutorial on how to do it?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline up8051

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: pl
Re: Gowin Simulation
« Reply #4 on: May 10, 2021, 08:13:24 pm »
Did you resolve problem with IP simulation?
 

Offline FlyingDutch

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Re: Gowin Simulation
« Reply #5 on: May 11, 2021, 08:38:48 am »
Hello,
there is short note about simulation for Gowin FPGA in this document:

https://www.gowinsemi.com/upload/database_doc/1/document/5bfcfcab42d1c.pdf?_file=database_doc%2F1%2Fdocument%2F5bfcfcab42d1c.pdf

See paragraph : 6.4 Simulation.

Best Regards
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Re: Gowin Simulation
« Reply #6 on: May 11, 2021, 09:05:16 am »
Thanks, But There is no such option in the tools, I'm using 1.9.7.01 Beta, and I think it's the latest version.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Saa1206

  • Contributor
  • Posts: 11
  • Country: ru
Re: Gowin Simulation
« Reply #7 on: January 02, 2022, 08:27:16 am »
Wanna simulate Gowin's IP-blocks in, say, Mentor's ModelSim.
E.g. CPLD GW1N-UV1P5LQ100C6/I5 OSCO, described in UG286-1.9.1E Gowin Clock User Guide.pdf page 100/104 topic 6.1.5 OSCO
At %Gowin_DIR%\Gowin_V1.9.8.01\IDE\simlib\gw1n\prim_sim.v look for OSCO

Code: [Select]
//OSCO,for gw1n-2
//Fosc = 250M/FREQ_DIV
module OSCO (OSCOUT, OSCEN);
parameter  FREQ_DIV = 100; // 2~128,only even num
parameter  REGULATOR_EN = 1'b0;  //1'b0, Powered by VCC!; 1’b1: Powered by regulator(only UV/LV).
output OSCOUT;
input OSCEN;

reg oscr;
realtime half_clk;

initial  begin
    oscr = 1'b0;
    half_clk = 2*FREQ_DIV;
end

assign OSCOUT = OSCEN ? oscr : 1'b1;

always
       begin
            #half_clk;
            oscr = 1'b1;    
            #half_clk;
            oscr = 1'b0;
       end

endmodule

But what are FREQ_DIV and REGULATOR_EN?!
And where is clock division?!
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Re: Gowin Simulation
« Reply #8 on: January 02, 2022, 10:13:54 am »
Saa1206 could you do any simulation with IP at all?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Mecanix

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: cc
Re: Gowin Simulation
« Reply #9 on: April 03, 2024, 03:12:21 pm »
For the record. This will teach how to import the Gowin's precompiled libraries into ModelSim / QuestaSim and run simulations based on their IPcores. Tested yesterday with QuestaSim 2023 & Gowin Designer 1.9.9.01 (build71333).

https://youtu.be/2uUcYFE-3S8?t=393   
 

Offline mon2

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: ca
Re: Gowin Simulation
« Reply #10 on: April 05, 2024, 10:17:16 am »
BTW, a new version of the Gowin IDE was released earlier this week.
 
The following users thanked this post: ali_asadzadeh, Mecanix

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: ca
Re: Gowin Simulation
« Reply #11 on: April 06, 2024, 09:41:15 am »
Quote
For the record. This will teach how to import the Gowin's precompiled libraries into ModelSim / QuestaSim and run simulations based on their IPcores. Tested yesterday with QuestaSim 2023 & Gowin Designer 1.9.9.01 (build71333).

https://youtu.be/2uUcYFE-3S8?t=393   

Thanks for sharing >:D
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf