(no commit message)
[libreriscv.git] / sandbox.mdwn
1 This is the SandBox, a page anyone can edit to learn how to use the wiki.
2
3 ----
4
5 Some codebox:
6
7 ```python
8 from enum import Enum, unique
9 from nmigen import *
10
11 @unique
12 class selects(Enum):
13 sel_A = 0
14 sel_B = 1
15 sel_C = 2
16 sel_D = 3
17 sel_E = 4
18 sel_F = 20
19
20 class Top(Elaboratable):
21 def __init__(self):
22 self.in_ = Signal(selects)
23 self.out = Signal()
24
25 def elaborate(self, platform):
26 m = Module()
27 m.d.comb += self.out.eq(self.in_)
28
29 with m.If(self.in_ == selects.sel_F):
30 m.d.comb += self.out.eq(1)
31 with m.Else():
32 m.d.comb += self.out.eq(0)
33
34 return m
35
36 from nmigen.back import verilog
37 f = open("top.v", "w")
38 top = Top()
39 ports = [top.in_, top.out]
40 f.write(verilog.convert(top, name='top',strip_internal_attrs=True,ports=ports))
41 ```
42
43 # experiment with single bullet
44
45 heading
46
47 1. hello
48 2. bullet2
49
50 test indentation
51 test again
52
53 heading again
54
55 1. bullet now two blank lines after
56
57
58 indent after 2 blank lines
59 more indent
60
61
62 Here's a paragraph.
63
64 Here's another one with *emphasised* text.
65
66 # Header
67
68 ## Subheader
69
70 > This is a blockquote.
71 >
72 > This is the first level of quoting.
73 >
74 > > This is nested blockquote.
75 >
76 > Back to the first level.
77
78 Numbered list
79
80 1. First item.
81 1. Another.
82 1. And another..
83
84 Bulleted list
85
86 * *item*
87 * item
88
89 <iframe src="https://git.libre-soc.org/?p=crowdsupply.git;a=blob_plain;f=Makefile;hb=69576cbd0ca58e98ebbf525d827b377fe7ad04fc"></iframe>
90
91 [[ikiwiki/WikiLink]]