0a6c00b22680800114975c8f9f412c584809217d
[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 * hello
48
49 test indentation
50 test again
51
52 heading again
53
54 * bullet now two blank lines after
55
56
57 indent after 2 blank lines
58 more indent
59
60
61 Here's a paragraph.
62
63 Here's another one with *emphasised* text.
64
65 # Header
66
67 ## Subheader
68
69 > This is a blockquote.
70 >
71 > This is the first level of quoting.
72 >
73 > > This is nested blockquote.
74 >
75 > Back to the first level.
76
77 Numbered list
78
79 1. First item.
80 1. Another.
81 1. And another..
82
83 Bulleted list
84
85 * *item*
86 * item
87
88 <iframe src="https://git.libre-soc.org/?p=crowdsupply.git;a=blob_plain;f=Makefile;hb=69576cbd0ca58e98ebbf525d827b377fe7ad04fc"></iframe>
89
90 [[ikiwiki/WikiLink]]