-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[concepts] VHDL with Markdown entry (reverse vdf)
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
-- NOTE: it's ad-hoc example of reverse VDF idea | ||
-- Docs and VDF cells are burried into source file | ||
-- Line with `%%vdf-reverse ` magic sequence marks it's reverse vdf format | ||
-- word after magic sequence defines format for doc cells / output document | ||
-- Sequence before `%%vdf-reverse ` defines start sequence to determine VDF data | ||
-- Consequent lines with start sequence are treated as single cell | ||
-- Ending fenced sequence is not necessary for code cells | ||
-- First cell's line identation defines indent for generated code (if there would be any) | ||
|
||
--- %%vdf-reverse markdown | ||
|
||
--- --- | ||
--- # Front matter part (due to extra --- above), YAML format | ||
--- author: Nikolay Gniteev ([email protected]) | ||
--- description: |- | ||
--- Exmaple of description in source file (aka reverse VDF) | ||
--- Showed approach allows to | ||
--- - generate documents out of source | ||
--- - generate code and documents from data in outer format | ||
--- and keep them in sync | ||
--- | ||
--- > NOTE: Shown below VDF tags just for example to illustrate idea | ||
-- > and do not exitst/supported at time this file were created | ||
--- version: 1.0.0 | ||
|
||
--- # Heading 1 | ||
--- | ||
--- Some text here | ||
|
||
library library IEEE; | ||
use IEEE.std_logic_1164.all; | ||
use IEEE.numeric_std.all; | ||
|
||
--- # Heading 2 | ||
--- | ||
--- Some text here too | ||
--- | ||
--- For example - entity brief | ||
|
||
entity main is | ||
generic ( | ||
--- ```yaml | ||
--- %%vdf generics | ||
--- generics description in YAML format or ref to outer file | ||
|
||
-- NOTE: after section above a generated code with generics should arise | ||
); | ||
port ( | ||
--- ```yaml | ||
--- %%vdf interface attr-prefix-xxx attr-suffix-yyy | ||
--- regs description in YAML format or ref to outer file | ||
|
||
-- NOTE: after section above a generated code with interfaces should arise | ||
); | ||
end entity main; | ||
|
||
--- # Heading 3 | ||
--- | ||
--- Some text here too | ||
|
||
architecture rtl of main is | ||
|
||
--- ```rdml | ||
--- %%vdf rdml | ||
--- regs description in RDML format or ref to outer file | ||
|
||
-- NOTE: after section above a generated code with registers definitions should arise | ||
|
||
begin | ||
|
||
|
||
|
||
end architecture rtl; |