X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=sandbox.mdwn;h=4e8bb3cc781e5112a61b0355ef34f736354bd890;hb=ee952ab4310451ada3fdb590864abf39b23e16f0;hp=aea086bf2a37e797d30337a02cb415e5932e8956;hpb=f7ee086562e6c30eeafdb45d4b4c01eb0bdaf4e7;p=libreriscv.git diff --git a/sandbox.mdwn b/sandbox.mdwn index aea086bf2..4e8bb3cc7 100644 --- a/sandbox.mdwn +++ b/sandbox.mdwn @@ -1,35 +1,64 @@ This is the SandBox, a page anyone can edit to learn how to use the wiki. +---- - +Some codebox: + +```python +from enum import Enum, unique +from nmigen import * + +@unique +class selects(Enum): + sel_A = 0 + sel_B = 1 + sel_C = 2 + sel_D = 3 + sel_E = 4 + sel_F = 20 + +class Top(Elaboratable): + def __init__(self): + self.in_ = Signal(selects) + self.out = Signal() + + def elaborate(self, platform): + m = Module() + m.d.comb += self.out.eq(self.in_) + + with m.If(self.in_ == selects.sel_F): + m.d.comb += self.out.eq(1) + with m.Else(): + m.d.comb += self.out.eq(0) + + return m + +from nmigen.back import verilog +f = open("top.v", "w") +top = Top() +ports = [top.in_, top.out] +f.write(verilog.convert(top, name='top',strip_internal_attrs=True,ports=ports)) +``` + +# experiment with single bullet + +heading + +* hello +* bullet2 +``` + test indentation + test again +``` + +heading again + +1. bullet now two blank lines after + + + indent after 2 blank lines + more indent ----- Here's a paragraph. @@ -58,4 +87,6 @@ Bulleted list * *item* * item + + [[ikiwiki/WikiLink]]