From 7f6b133241b8d1f7a1f6b8ed41923874693ce4a7 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 7 Aug 2020 00:23:48 +0200 Subject: [PATCH] Store the initialized submodules in self It has a prettier syntax highligting --- fpga/icebreaker.dg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fpga/icebreaker.dg b/fpga/icebreaker.dg index f644cc0..c05b3a6 100644 --- a/fpga/icebreaker.dg +++ b/fpga/icebreaker.dg @@ -12,16 +12,16 @@ Top = subclass Elaboratable where @ledg = platform.request "led_g" @seg7 = platform.request "seven_seg" - blinker1 = Blinker$ int (freq // 3) - m.submodules += blinker1 + @blinker = Blinker$ freq // 3 + m.submodules += @blinker - blinker2 = Pulser$ int (freq // 3) - m.submodules += blinker2 + @pulser = Pulser$ freq // 3 + m.submodules += @pulser - comb$ drive @ledr blinker1.out + sync$ drive @ledr @blinker.out hello = Signal 1 reset: 1 - when blinker2.out $ -> + when @pulser.out $ -> sync$ drive hello ~hello sync$ drive @ledg hello