Hợp tác
NGHỆ THUẬT
LÀM ĐẸP VÀ SỨC KHỎE
THỦ CÔNG
VĂN HÓA VÀ LỊCH SỬ
GIẢI TRÍ
MÔI TRƯỜNG
THỰC PHẨM VÀ ĐỒ UỐNG
KỸ THUẬT NGƯỢC
KHOA HỌC
THỂ THAO
CÔNG NGHỆ
THIẾT BỊ ĐEO

Youblob (simulation output) · CC0
Your Own chip_core: An 8-bit PWM Dimmer, Tested Before It Is Silicon
The wafer.space project template arrives with an example design, a 42-bit counter, in src/chip_core.sv. Your own chip starts where you replace it, and a chip cannot be patched after the foundry has made it, so the replacement has to be proven in simulation first.
This rung replaces the counter with an 8-bit PWM dimmer. Eight pads read a brightness from 0 to 255, one pad drives the pulse-width-modulated output, and an input pin enables it. It uses the template's own port list, so it drops into the template unchanged, and it fits even the smallest 0.5x0.5 slot.
Both the core and its cocotb testbench were run for this blueprint with Icarus Verilog 12.0 and cocotb 2.1.0, and all three tests pass. The picture is that simulation's own output.
Nâng cao
An evening
Hướng dẫn
1
1
What an 8-bit PWM gives you
What an 8-bit PWM gives you
Đang tải sổ tay Jupyter…
2
2
The template this core goes into
The template this core goes into
The embedded blueprint sets up the project template. This rung writes the core that goes inside it.
3
3
What chip_core is given
What chip_core is given
In the template, chip_top.sv holds the pad ring and passes the pads to chip_core, which receives the clock, an active-low reset and three groups of signals: input pads, bidirectional pads and analog pads. The numbers of each depend on the slot: the 0.5x0.5 slot has 4 input, 38 bidirectional and 4 analog pads, the full 1x1 slot 12 input, 40 bidirectional and 2 analog.
A bidirectional pad is controlled from inside the core, one bit per pad: bidir_oe enables the output driver, bidir_ie the input buffer, bidir_cs chooses a Schmitt-trigger input, bidir_sl a slow slew rate, and bidir_pu and bidir_pd switch in pull-up and pull-down resistors. The template's example drives every bidirectional pad as an output; this rung turns eight of them into inputs.
4
4
The core
The core
src/chip_core.sv for the dimmer. The port list is the template's, unchanged. Pads 0 to 7 are inputs with Schmitt triggers; pad 8 and above are outputs, with every pad except 8 held low. The template's example also instantiated two SRAM macros; this core does not use them, so they are gone.
chip_core.svsystemverilog
Công cụ cần thiết:
Máy tính để bàn5
5
The test that proves it
The test that proves it
A cocotb testbench that drives chip_core directly. It sets six duty values and counts the high clocks over four whole periods (1,024 clocks), checks that disabling the core holds the output low, and checks the pad directions. Run it with python3 test_pwm.py; Icarus Verilog needs -g2012 for the SystemVerilog and a 1 ns / 1 ps timescale for the 20 ns clock.
test_pwm.pypython
Công cụ cần thiết:
Máy tính để bàn6
6
What the simulation printed
What the simulation printed
The run for this blueprint, Icarus Verilog 12.0 and cocotb 2.1.0, parameters for the 0.5x0.5 slot:
duty 0: high 0 of 1024 cycles
duty 1: high 4 of 1024 cycles
duty 64: high 256 of 1024 cycles
duty 128: high 512 of 1024 cycles
duty 200: high 800 of 1024 cycles
duty 255: high 1020 of 1024 cycles
TESTS=3 PASS=3 FAIL=0 SKIP=0
Every count is exactly four times the duty value. To check that the test can fail, the comparison in the core was changed from count < duty to count <= duty; the test then failed at once (duty 0 gave 4 high cycles, not 0), and the core was put back.
In the template itself, replace src/chip_core.sv with this file and update the template's own testbench, cocotb/chip_top_tb.py, whose test still expects the counter; make sim then runs it through the pads and the PDK's models.
7
7
A core that will not simulate or will not pass
A core that will not simulate or will not pass
chip_core simulation troubleshooting.
Flow
Loading...
8
8
Sources and honest limits
Sources and honest limits
**Sources**, read 29 September 2026: the wafer-space/gf180mcu-project-template repository (src/chip_core.sv, src/slot_defines.svh, cocotb/chip_top_tb.py; Apache-2.0), whose port list and pad-control signals this core keeps.
**Honest limits.** The simulation is at the chip_core level only, without the pad ring, the PDK's pad and SRAM models, synthesis or a layout. It proves the logic, not the timing or the manufactured chip. The gate-level simulation after LibreLane, which the template runs with make sim-gl, is the next check.
Công cụ yêu cầu
1- Tạm thời
Blueprint liên quan
Các blueprint này chia sẻ kiến thức — kỹ thuật, vật liệu hoặc nguyên tắc
CC0 Phạm vi công cộng
Bản thiết kế này được phát hành theo CC0. Bạn tự do sao chép, sửa đổi, phân phối và sử dụng cho bất kỳ mục đích nào mà không cần xin phép.
Hỗ trợ nhà sáng tạo bằng cách mua sản phẩm qua bản thiết kế, nơi họ nhận Hoa hồng nhà sáng tạo do nhà bán hàng đặt, hoặc tạo phiên bản mới và kết nối trong bản thiết kế riêng để chia sẻ doanh thu.


