Author Topic: Learn FPGA from scratch  (Read 16847 times)

0 Members and 3 Guests are viewing this topic.

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Learn FPGA from scratch
« on: April 23, 2025, 04:39:58 pm »
  Learn FPGA from scratch,I don't know anything about FPGA.I like these very much. Simulate using the chip EF2L45LG100B.
There are Chinese characters in the picture. Please don't report it.

video:https://www.bilibili.com/video/BV1TELazsEgs/?share_source=copy_web&vd_source=cc85b342080f282f8270cd6a82b94532* fn_sw.zip (128.35 kB - downloaded 111 times.)
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #1 on: April 23, 2025, 04:42:59 pm »
Code: [Select]
`timescale 1ns/10ps
module fn_sw
(
a,
b,
sel,
y
);
input a;
input b;
input sel;
output y;

assign y=sel?(a^b):(a&b);
endmodule
/******************testbench of fn_sw*************/
module fn_sw_tb;
reg a, b, sel;
wire y;
fn_sw fn_sw
(
.a(a),
.b(b),
.sel(sel),
.y(y)
);
initial
begin
a<=0;b<=0;sel<=0;
#10 a<=1;b<=0;sel<=0;
#10 a<=0;b<=1;sel<=0;
#10 a<=0;b<=0;sel<=1;
#10 a<=1;b<=0;sel<=1;
#10 a<=0;b<=1;sel<=1;
#10 $stop;

end
endmodule
/**************************************************/
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5975
  • Country: nl
Re: Learn FPGA from scratch
« Reply #2 on: April 23, 2025, 04:57:53 pm »
And what is your specific question about this?

If you are at the beginning of working with FPGA's you can find lots of information on the internet about them.

The Anlogic IDE does not support simulation directly for as far as I'm aware. To do simulation one needs a tool like for instance Modelsim, which has a free version supplied by Altera/Intel as part of their Quartus IDE suite.

In simulation there are levels on which one can simulate. There is logic level, which just takes your verilog or VHDL and simulates the logic in it based on the given test bench. Then there is gate or primitive level, where the low level elements of the FPGA are taken into account into the simulation. And there is full timing simulation, where the timing parameters of the low level elements are also taken into account. For the last two types one needs specific files from the manufacturer to be able to do those simulations. I have not done this for Anlogic FPGA's yet, so no idea on where the needed files are.

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6728
  • Country: pw
Re: Learn FPGA from scratch
« Reply #3 on: April 23, 2025, 05:57:06 pm »
The best way how to learn from scratch with a lot of fun is following, imho:

1. buy a cheap fpga board with an fpga chip supported by your development software
2. take an existing verilog example, learn how to build it and how to program the bitstream into your fpga
3. learn how to edit the verilog sources (there are several files usually) of that example
4. make small changes in the example sources (learn to add/remove a functionality, use more i/o, rewire something, etc.), program the fpga and watch the results, step by step..
5. goto 4.

« Last Edit: April 23, 2025, 06:28:12 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: egonotto

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5975
  • Country: nl
Re: Learn FPGA from scratch
« Reply #4 on: April 23, 2025, 06:54:14 pm »
The best way how to learn from scratch with a lot of fun is following, imho:

1. buy a cheap fpga board with an fpga chip supported by your development software
2. take an existing verilog example, learn how to build it and how to program the bitstream into your fpga
3. learn how to edit the verilog sources (there are several files usually) of that example
4. make small changes in the example sources (learn to add/remove a functionality, use more i/o, rewire something, etc.), program the fpga and watch the results, step by step..
5. goto 4.

If you watch the video, you would see that the first two steps are taken care of. The OP has some nice board with a couple of 7 segment displays and push buttons.

https://www.bilibili.com/video/BV1TELazsEgs/?share_source=copy_web&vd_source=cc85b342080f282f8270cd6a82b94532

I checked it and it seems to be safe. The video itself is not giving information on what the original post really is about.

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1809
  • Country: us
Re: Learn FPGA from scratch
« Reply #5 on: April 25, 2025, 09:57:15 pm »
Does Tang Dynasty support SystemVerilog? If so, consider switching to that rather than the old version of Verilog syntax you're using.
"That's not even wrong" -- Wolfgang Pauli
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: Learn FPGA from scratch
« Reply #6 on: April 26, 2025, 03:39:27 am »
  Learn FPGA from scratch,I don't know anything about FPGA.I like these very much. Simulate using the chip EF2L45LG100B.
There are Chinese characters in the picture. Please don't report it.

video:https://www.bilibili.com/video/BV1TELazsEgs/?share_source=copy_web&vd_source=cc85b342080f282f8270cd6a82b94532 (Attachment Link) (Attachment Link)

According to the log screenshot you were able to build and upload the design to the FPGA.  What do you want to know?
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #7 on: May 10, 2025, 03:14:57 pm »
Draw a development board by hand.

an easier eda experience  lceda.cn version:v6.5.46
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #8 on: May 10, 2025, 03:19:09 pm »
JPEG
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #9 on: May 10, 2025, 03:30:54 pm »
an intact project
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: Learn FPGA from scratch
« Reply #10 on: May 10, 2025, 04:03:39 pm »
Is it related to EasyEDA?  They seem to use the same logo with a cloud symbol and a switch.

https://easyeda.com/images/System-Integration.png
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: Learn FPGA from scratch
« Reply #11 on: May 10, 2025, 04:05:07 pm »
Draw a development board by hand.

an easier eda experience  lceda.cn version:v6.5.46

If lceda.cn is a cloud tool, why do they have a 'Download' button?
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #12 on: May 11, 2025, 03:10:46 am »
installation of the collaborative version
 

Offline LovelyA72

  • Regular Contributor
  • *
  • Posts: 63
  • Country: us
  • Kashikoma from Massachusetts!
Re: Learn FPGA from scratch
« Reply #13 on: May 11, 2025, 11:29:36 pm »
LCEDA is basically the Chinese version of EasyEDA. LC stands for JLC's LC. They offer an offline build that you can download. I am not sure why it's not an option for the overseas version.
Kashikoma!
 

Offline LovelyA72

  • Regular Contributor
  • *
  • Posts: 63
  • Country: us
  • Kashikoma from Massachusetts!
Re: Learn FPGA from scratch
« Reply #14 on: May 11, 2025, 11:30:57 pm »
He's just wanna share his Anlogic FPGA learning process. He's trying his hardest to use English since he's in China. (fyi I am his friend!)
Kashikoma!
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 5636
  • Country: Earth
Re: Learn FPGA from scratch
« Reply #15 on: May 12, 2025, 03:24:24 am »
您可以使用AI聊天机器人来帮助改善翻译并纠正语法错误。

如您所见,我可以用中文写作且没有错误,即使我不懂汉字 :)
« Last Edit: May 12, 2025, 03:25:56 am by radiolistener »
 
The following users thanked this post: zapta

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5975
  • Country: nl
Re: Learn FPGA from scratch
« Reply #16 on: May 12, 2025, 06:38:58 am »
您可以使用AI聊天机器人来帮助改善翻译并纠正语法错误。

如您所见,我可以用中文写作且没有错误,即使我不懂汉字 :)

To save others some work:

Quote
You can use AI chatbots to help improve translations and correct grammatical errors.

As you can see, I can write in Chinese without errors, even though I don’t know Chinese characters

@radiolistener, how can you know for sure that it is correct Chinese without knowing the Chinese characters.  :-//   :-DD

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: Learn FPGA from scratch
« Reply #17 on: May 12, 2025, 01:56:01 pm »
LCEDA is basically the Chinese version of EasyEDA. LC stands for JLC's LC. They offer an offline build that you can download. I am not sure why it's not an option for the overseas version.

I tried EasyEDA once or twice for small circuits. It worked but it didn't feel solid like let's say Kicad.  If done right, web based engineering applications can be very competitive, for example, Onshape, a commercial web based mechanical design software competes very well with non web applications and feels very 'native'.  (Free for makers if anybody wants to try).

As for your friend, there are open sources FPGA design tools that were designed for ease of use and students in mind. For example, these two from an academic team in Spain https://fpgawars.github.io/ :

IceStudio - a graphical FPGA design tool where you design by drawing schematics. 

Apio - a command line FPGA design tool that was inspired by Platformio and provides simple commands such as 'apio build', 'apio sim', 'apio upload'.

(I use apio myself and also contributed some code, I recommend it installing from the nightly builds that are available here https://github.com/FPGAwars/apio/actions . I use it with Visual Studio Code as an editor but that's a personal choice. Let me know if you have any questions)

 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #18 on: May 16, 2025, 04:35:14 pm »
The model library is the highlight of this software.All goods of Lichuang.
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #19 on: June 08, 2025, 03:49:44 pm »
The second counter is finally written, but there are many grammatical errors.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 23197
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Learn FPGA from scratch
« Reply #20 on: June 08, 2025, 04:42:57 pm »
您可以使用AI聊天机器人来帮助改善翻译并纠正语法错误。

如您所见,我可以用中文写作且没有错误,即使我不懂汉字 :)

To save others some work:

Quote
You can use AI chatbots to help improve translations and correct grammatical errors.

As you can see, I can write in Chinese without errors, even though I don’t know Chinese characters

@radiolistener, how can you know for sure that it is correct Chinese without knowing the Chinese characters.  :-//   :-DD

Vibe translation, of course :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #21 on: June 10, 2025, 03:42:50 pm »
The second counter is ready.The third version is correct.I always make grammar mistakes.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: Learn FPGA from scratch
« Reply #22 on: June 10, 2025, 05:15:38 pm »
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #23 on: June 12, 2025, 12:11:35 am »
 toggle  <= !toggle;


This is right.
But it's not what I want.
 

Offline suzhimingTopic starter

  • Contributor
  • !
  • Posts: 46
  • Country: cn
Re: Learn FPGA from scratch
« Reply #24 on: June 15, 2025, 04:09:27 pm »
tri_gen * tri_gen.zip (0.65 kB - downloaded 25 times.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf