SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
verilog.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2026. Giulio Cocconi
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#pragma once
19
20
#include <span>
21
#include <string>
22
#include <string_view>
23
24
#include <
core/serialization/yosys/yosys_tool.hpp
>
25
#include <
core/sourceFile.hpp
>
26
27
namespace
SILICON::core
{
28
class
Circuit
;
29
}
30
31
namespace
SILICON::verilog
{
32
33
using
SourceFile
=
core::SourceFile
;
34
35
[[nodiscard]] std::string
read
(std::string_view source,
36
const
yosys::ToolOptions
& options = {});
37
[[nodiscard]] std::string
read
(std::span<const SourceFile> sources,
38
std::string_view entryPath,
39
const
yosys::ToolOptions
& options = {});
40
42
[[nodiscard]] std::string
postprocess
(std::string_view source);
43
44
[[nodiscard]] std::string
write
(std::string_view yosysJson,
45
const
yosys::ToolOptions& options = {});
46
[[nodiscard]] std::string
write
(
const
core::Circuit& circuit, std::string_view moduleName,
47
const
yosys::ToolOptions& options = {});
48
49
}
// namespace SILICON::verilog
SILICON::core::Circuit
Represents a digital circuit as a directed graph of components.
Definition
circuit.hpp:125
SILICON::core
Definition
activeKeyGuard.hpp:28
SILICON::verilog
Definition
verilog.cpp:34
SILICON::verilog::write
std::string write(const std::string_view yosysJson, const yosys::ToolOptions &options)
Definition
verilog.cpp:494
SILICON::verilog::postprocess
std::string postprocess(const std::string_view source)
Definition
verilog.cpp:488
SILICON::verilog::read
std::string read(const std::string_view source, const yosys::ToolOptions &options)
Definition
verilog.cpp:477
SILICON::verilog::SourceFile
core::SourceFile SourceFile
Definition
verilog.hpp:33
sourceFile.hpp
SILICON::core::SourceFile
Definition
sourceFile.hpp:25
SILICON::yosys::ToolOptions
Definition
yosys_tool.hpp:30
yosys_tool.hpp
src
core
serialization
verilog.hpp
Generated by
1.17.0