(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 Here's a paragraph.
44
45 Here's another one with *emphasised* text.
46
47 # Header
48
49 ## Subheader
50
51 > This is a blockquote.
52 >
53 > This is the first level of quoting.
54 >
55 > > This is nested blockquote.
56 >
57 > Back to the first level.
58
59 Numbered list
60
61 1. First item.
62 1. Another.
63 1. And another..
64
65 Bulleted list
66
67 * *item*
68 * item
69
70 <iframe src="https://git.libre-soc.org/?p=crowdsupply.git;a=blob_plain;f=Makefile;hb=69576cbd0ca58e98ebbf525d827b377fe7ad04fc"></iframe>
71
72 [[ikiwiki/WikiLink]]