From 5c60e5c7eedc71d44018b26116079756a18dc44e Mon Sep 17 00:00:00 2001 From: Risto97 Date: Sat, 14 Sep 2024 07:01:44 +0000 Subject: [PATCH] deploy: 18a0cb0a7ea3320a68d836a183fe00193cd95d2c --- 404.html | 8 ++++---- assets/js/0d51f232.75bb9500.js | 1 - assets/js/0d51f232.addf9622.js | 1 + assets/js/0e384e19.57eca9d7.js | 1 + assets/js/0e384e19.bd90d027.js | 1 - assets/js/2075ce04.fa169829.js | 1 + assets/js/393be207.51509cb1.js | 1 - assets/js/393be207.7494ecd4.js | 1 + assets/js/456dc1ab.4f646dca.js | 1 - assets/js/456dc1ab.e67f1e70.js | 1 + assets/js/4a070847.794ae60d.js | 1 - assets/js/935f2afb.29d60ef3.js | 1 - assets/js/935f2afb.da6001df.js | 1 + assets/js/c1b55f8d.8518942b.js | 1 - assets/js/c1b67de1.8c0ca6df.js | 1 - assets/js/c1b67de1.8de9dfeb.js | 1 + assets/js/cf98907a.340f7992.js | 1 + assets/js/cf98907a.98ca7d3c.js | 1 - assets/js/dc8c471e.262b45ea.js | 1 + assets/js/dc8c471e.f9cb0439.js | 1 - assets/js/ef3c401e.7c294cd1.js | 1 + assets/js/ff07f179.1273d7d4.js | 1 - assets/js/ff07f179.613ed7f1.js | 1 + assets/js/main.1c9d3f43.js | 2 ++ ...js.LICENSE.txt => main.1c9d3f43.js.LICENSE.txt} | 0 assets/js/main.ac55bd5d.js | 2 -- assets/js/runtime~main.55fde835.js | 1 - assets/js/runtime~main.d6ee780d.js | 1 + docs/api_documentation/index.html | 10 +++++----- docs/build_system/intro/index.html | 10 +++++----- docs/category/build-system/index.html | 8 ++++---- docs/category/examples/index.html | 8 ++++---- docs/examples/linking_ips/index.html | 10 +++++----- docs/examples/simulation/index.html | 12 ++++++------ docs/examples/verilator/index.html | 14 +++++++------- docs/getting_started/index.html | 10 +++++----- docs/intro/index.html | 12 ++++++------ index.html | 8 ++++---- markdown-page/index.html | 10 +++++----- sitemap.xml | 2 +- 40 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 assets/js/0d51f232.75bb9500.js create mode 100644 assets/js/0d51f232.addf9622.js create mode 100644 assets/js/0e384e19.57eca9d7.js delete mode 100644 assets/js/0e384e19.bd90d027.js create mode 100644 assets/js/2075ce04.fa169829.js delete mode 100644 assets/js/393be207.51509cb1.js create mode 100644 assets/js/393be207.7494ecd4.js delete mode 100644 assets/js/456dc1ab.4f646dca.js create mode 100644 assets/js/456dc1ab.e67f1e70.js delete mode 100644 assets/js/4a070847.794ae60d.js delete mode 100644 assets/js/935f2afb.29d60ef3.js create mode 100644 assets/js/935f2afb.da6001df.js delete mode 100644 assets/js/c1b55f8d.8518942b.js delete mode 100644 assets/js/c1b67de1.8c0ca6df.js create mode 100644 assets/js/c1b67de1.8de9dfeb.js create mode 100644 assets/js/cf98907a.340f7992.js delete mode 100644 assets/js/cf98907a.98ca7d3c.js create mode 100644 assets/js/dc8c471e.262b45ea.js delete mode 100644 assets/js/dc8c471e.f9cb0439.js create mode 100644 assets/js/ef3c401e.7c294cd1.js delete mode 100644 assets/js/ff07f179.1273d7d4.js create mode 100644 assets/js/ff07f179.613ed7f1.js create mode 100644 assets/js/main.1c9d3f43.js rename assets/js/{main.ac55bd5d.js.LICENSE.txt => main.1c9d3f43.js.LICENSE.txt} (100%) delete mode 100644 assets/js/main.ac55bd5d.js delete mode 100644 assets/js/runtime~main.55fde835.js create mode 100644 assets/js/runtime~main.d6ee780d.js diff --git a/404.html b/404.html index ca79709..ceb1842 100644 --- a/404.html +++ b/404.html @@ -3,11 +3,11 @@ -Page Not Found | SoCMake - - +Page Not Found | SoCMake + + -
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

\ No newline at end of file diff --git a/assets/js/0d51f232.75bb9500.js b/assets/js/0d51f232.75bb9500.js deleted file mode 100644 index 15b7d59..0000000 --- a/assets/js/0d51f232.75bb9500.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[98],{6991:(e,i,n)=>{"use strict";n.r(i),n.d(i,{assets:()=>p,cmakelists:()=>h,contentTitle:()=>d,default:()=>x,frontMatter:()=>l,graph:()=>c,metadata:()=>a,toc:()=>m});var s=n(4848),t=n(8453),r=n(4782),o=n(1432);const l={sidebar_position:2},d="Hierarchical design",a={id:"examples/linking_ips",title:"Hierarchical design",description:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.",source:"@site/docs/examples/linking_ips.mdx",sourceDirName:"examples",slug:"/examples/linking_ips",permalink:"/docs/examples/linking_ips",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/linking_ips.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Simulation",permalink:"/docs/examples/simulation"},next:{title:"Verilator C++ testbench",permalink:"/docs/examples/verilator"}},p={},c=n(3443).A,h=n(7958).A,m=[{value:"Graph",id:"graph",level:2},{value:"CMakeLists.txt",id:"cmakeliststxt",level:2}];function g(e){const i={admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.h1,{id:"hierarchical-design",children:"Hierarchical design"}),"\n","\n","\n",(0,s.jsx)(i.p,{children:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs."}),"\n",(0,s.jsxs)(i.p,{children:["Let's try to create a bit more complex example to demonstrate how to link different libraries together.\nImagine the following graph.",(0,s.jsx)("br",{})]}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:["We have a ",(0,s.jsx)(i.code,{children:"top"})," IP that instantiates some primitives: ",(0,s.jsx)(i.code,{children:"prim10"})," and ",(0,s.jsx)(i.code,{children:"prim11"}),"."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prim10"})," depends on ",(0,s.jsx)(i.code,{children:"prim00"}),"."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prim11"})," depends on ",(0,s.jsx)(i.code,{children:"prim00"})," and ",(0,s.jsx)(i.code,{children:"prim01"}),"."]}),"\n"]}),"\n",(0,s.jsx)(i.h2,{id:"graph",children:"Graph"}),"\n",(0,s.jsx)(r.i,{dot:c}),"\n",(0,s.jsx)(i.h2,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,s.jsxs)(i.p,{children:["We can create this hierarchy with the following ",(0,s.jsx)(i.code,{children:"CMakeLists.txt"})]}),"\n",(0,s.jsx)(o.A,{language:"verilog",title:"CMakeLists.txt",showLineNumbers:!0,children:h}),"\n",(0,s.jsx)(i.admonition,{type:"warning",children:(0,s.jsxs)(i.p,{children:["We can see in the highlighted lines ",(0,s.jsx)(i.code,{children:"add_ip()"})," function calls, that we are adding IPs without ",(0,s.jsx)(i.code,{children:"VENDOR"}),", ",(0,s.jsx)(i.code,{children:"LIBRARY"}),", ",(0,s.jsx)(i.code,{children:"VERSION"})," format, instead we only pass the ",(0,s.jsx)(i.code,{children:"NAME"}),".\nThis is not recommended, and we set ",(0,s.jsx)(i.code,{children:"SOCMAKE_NOWARN_VLNV"})," variable to true, so we don't get a warning."]})}),"\n",(0,s.jsxs)(i.p,{children:["Finally we are describing our dependencies with ",(0,s.jsx)(i.code,{children:"ip_link()"})," function.\nThe ",(0,s.jsx)(i.code,{children:"ip_link()"})," function as first positional argument takes the ",(0,s.jsx)(i.code,{children:"Dependent"})," library, and the rest of the arguments are its ",(0,s.jsx)(i.code,{children:"Dependencies"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["We can get the ",(0,s.jsx)(i.code,{children:"Source Filesets"})," by calling ",(0,s.jsx)(i.code,{children:"get_ip_sources()"})," on the IP library.\nFirst argument is the variable where to save the list of sources, second one is the name of the IP library and the last one is the file type."]}),"\n",(0,s.jsx)(i.p,{children:"We are finally printing the list of sources to stdout in the last 2 lines."}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-raw",children:"-- CPM: Adding package SoCMake@ (verilator_system_path)\nV_SOURCES:\n ..../linking_ips/prim00.v\n ..../linking_ips/prim01.v\n ..../linking_ips/prim10.v\n ..../linking_ips/prim11.v\n ..../linking_ips/top.v\n-- Configuring done\n-- Generating done\n-- Build files have been written to: ..../linking_ips/build\n"})}),"\n",(0,s.jsx)(i.admonition,{type:"caution",children:(0,s.jsxs)(i.p,{children:["CMake property populated in this case will be ",(0,s.jsx)(i.code,{children:"VERILOG_SOURCES"}),", the library ",(0,s.jsx)(i.code,{children:"top"})," will only hold its own ",(0,s.jsx)(i.code,{children:"VERILOG_SOURCES"})," in this case ",(0,s.jsx)(i.code,{children:"top.v"}),", so if you use ",(0,s.jsx)(i.code,{children:"get_target_property(V_SOURCES top VERILOG_SOURCES)"})," you will only get one file, if you want to get the files of all IPs use ",(0,s.jsx)(i.code,{children:"get_ip_sources()"})]})}),"\n",(0,s.jsx)(i.p,{children:"We can see that the order of the printed files is respected and that the lowest hierarchy IPs files are first."}),"\n",(0,s.jsx)(i.admonition,{type:"tip",children:(0,s.jsxs)(i.p,{children:["Running ",(0,s.jsx)(i.code,{children:"make graphviz"})," on the previous example will generate the graph shown above"]})}),"\n",(0,s.jsx)(i.admonition,{type:"tip",children:(0,s.jsx)(i.p,{children:"It is recommended to keep libraries in separate directories and CMakeLists.txt files, and ideally on their own GIT repositories."})})]})}function x(e={}){const{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(g,{...e})}):g(e)}},7958:(e,i,n)=>{"use strict";n.d(i,{A:()=>s});const s='cmake_minimum_required(VERSION 3.25)\nproject(example \n LANGUAGES NONE\n VERSION 0.0.1)\n\ninclude("deps/deps.cmake")\n# highlight-next-line\nset(SOCMAKE_NOWARN_VLNV TRUE) # Do not warn incomplete VLNV format\n\n## Define IP TOP\n# highlight-next-line\nadd_ip(top)\nip_sources(top VERILOG\n ${PROJECT_SOURCE_DIR}/top.v\n )\n\n# Define IP prim10\n# highlight-next-line\nadd_ip(prim10)\nip_sources(prim10 VERILOG\n ${PROJECT_SOURCE_DIR}/prim10.v\n )\n\n## Define IP prim11\n# highlight-next-line\nadd_ip(prim11)\nip_sources(prim11 VERILOG\n ${PROJECT_SOURCE_DIR}/prim11.v\n )\n\n## Define IP prim00\n# highlight-next-line\nadd_ip(prim00)\nip_sources(prim00 VERILOG\n ${PROJECT_SOURCE_DIR}/prim00.v\n )\n\n## Define IP prim01\nadd_ip(prim01)\nip_sources(prim01 VERILOG\n ${PROJECT_SOURCE_DIR}/prim01.v\n )\n\n# highlight-start\nip_link(top prim10 prim11)\nip_link(prim10 prim00)\nip_link(prim11 prim00 prim01)\n# highlight-end\n\n# Get Verilog sources\nget_ip_sources(V_SOURCES top VERILOG)\n# Just print sources\nstring(REPLACE ";" "\\n " V_SOURCES "${V_SOURCES}")\nmessage("V_SOURCES: \\n ${V_SOURCES}")\n'},3443:(e,i,n)=>{"use strict";n.d(i,{A:()=>s});const s='digraph "example" {\nnode [\n fontsize = "12"\n];\n\n\n\n "node3" [ label = "prim00", shape = pentagon ];\n "node4" [ label = "prim01", shape = pentagon ];\n "node5" [ label = "prim10", shape = pentagon ];\n "node5" -> "node3" [ style = dashed ] // prim10 -> prim00\n "node6" [ label = "prim11", shape = pentagon ];\n "node6" -> "node3" [ style = dashed ] // prim11 -> prim00\n "node6" -> "node4" [ style = dashed ] // prim11 -> prim01\n "node7" [ label = "top", shape = pentagon ];\n "node7" -> "node5" [ style = dashed ] // top -> prim10\n "node7" -> "node6" [ style = dashed ] // top -> prim11\n}\n'},2938:()=>{},6120:()=>{},6984:()=>{}}]); \ No newline at end of file diff --git a/assets/js/0d51f232.addf9622.js b/assets/js/0d51f232.addf9622.js new file mode 100644 index 0000000..6355f93 --- /dev/null +++ b/assets/js/0d51f232.addf9622.js @@ -0,0 +1 @@ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[98],{6991:(e,i,n)=>{"use strict";n.r(i),n.d(i,{assets:()=>p,cmakelists:()=>h,contentTitle:()=>a,default:()=>x,frontMatter:()=>l,graph:()=>c,metadata:()=>d,toc:()=>m});var s=n(4848),t=n(8453),r=n(4782),o=n(1432);const l={sidebar_position:2},a="Hierarchical design",d={id:"examples/linking_ips",title:"Hierarchical design",description:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.",source:"@site/docs/examples/linking_ips.mdx",sourceDirName:"examples",slug:"/examples/linking_ips",permalink:"/SoCMake/docs/examples/linking_ips",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/linking_ips.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Simulation",permalink:"/SoCMake/docs/examples/simulation"},next:{title:"Verilator C++ testbench",permalink:"/SoCMake/docs/examples/verilator"}},p={},c=n(3443).A,h=n(7958).A,m=[{value:"Graph",id:"graph",level:2},{value:"CMakeLists.txt",id:"cmakeliststxt",level:2}];function g(e){const i={admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.h1,{id:"hierarchical-design",children:"Hierarchical design"}),"\n","\n","\n",(0,s.jsx)(i.p,{children:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs."}),"\n",(0,s.jsxs)(i.p,{children:["Let's try to create a bit more complex example to demonstrate how to link different libraries together.\nImagine the following graph.",(0,s.jsx)("br",{})]}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:["We have a ",(0,s.jsx)(i.code,{children:"top"})," IP that instantiates some primitives: ",(0,s.jsx)(i.code,{children:"prim10"})," and ",(0,s.jsx)(i.code,{children:"prim11"}),"."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prim10"})," depends on ",(0,s.jsx)(i.code,{children:"prim00"}),"."]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prim11"})," depends on ",(0,s.jsx)(i.code,{children:"prim00"})," and ",(0,s.jsx)(i.code,{children:"prim01"}),"."]}),"\n"]}),"\n",(0,s.jsx)(i.h2,{id:"graph",children:"Graph"}),"\n",(0,s.jsx)(r.i,{dot:c}),"\n",(0,s.jsx)(i.h2,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,s.jsxs)(i.p,{children:["We can create this hierarchy with the following ",(0,s.jsx)(i.code,{children:"CMakeLists.txt"})]}),"\n",(0,s.jsx)(o.A,{language:"verilog",title:"CMakeLists.txt",showLineNumbers:!0,children:h}),"\n",(0,s.jsx)(i.admonition,{type:"warning",children:(0,s.jsxs)(i.p,{children:["We can see in the highlighted lines ",(0,s.jsx)(i.code,{children:"add_ip()"})," function calls, that we are adding IPs without ",(0,s.jsx)(i.code,{children:"VENDOR"}),", ",(0,s.jsx)(i.code,{children:"LIBRARY"}),", ",(0,s.jsx)(i.code,{children:"VERSION"})," format, instead we only pass the ",(0,s.jsx)(i.code,{children:"NAME"}),".\nThis is not recommended, and we set ",(0,s.jsx)(i.code,{children:"SOCMAKE_NOWARN_VLNV"})," variable to true, so we don't get a warning."]})}),"\n",(0,s.jsxs)(i.p,{children:["Finally we are describing our dependencies with ",(0,s.jsx)(i.code,{children:"ip_link()"})," function.\nThe ",(0,s.jsx)(i.code,{children:"ip_link()"})," function as first positional argument takes the ",(0,s.jsx)(i.code,{children:"Dependent"})," library, and the rest of the arguments are its ",(0,s.jsx)(i.code,{children:"Dependencies"}),"."]}),"\n",(0,s.jsxs)(i.p,{children:["We can get the ",(0,s.jsx)(i.code,{children:"Source Filesets"})," by calling ",(0,s.jsx)(i.code,{children:"get_ip_sources()"})," on the IP library.\nFirst argument is the variable where to save the list of sources, second one is the name of the IP library and the last one is the file type."]}),"\n",(0,s.jsx)(i.p,{children:"We are finally printing the list of sources to stdout in the last 2 lines."}),"\n",(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-raw",children:"-- CPM: Adding package SoCMake@ (verilator_system_path)\nV_SOURCES:\n ..../linking_ips/prim00.v\n ..../linking_ips/prim01.v\n ..../linking_ips/prim10.v\n ..../linking_ips/prim11.v\n ..../linking_ips/top.v\n-- Configuring done\n-- Generating done\n-- Build files have been written to: ..../linking_ips/build\n"})}),"\n",(0,s.jsx)(i.admonition,{type:"caution",children:(0,s.jsxs)(i.p,{children:["CMake property populated in this case will be ",(0,s.jsx)(i.code,{children:"VERILOG_SOURCES"}),", the library ",(0,s.jsx)(i.code,{children:"top"})," will only hold its own ",(0,s.jsx)(i.code,{children:"VERILOG_SOURCES"})," in this case ",(0,s.jsx)(i.code,{children:"top.v"}),", so if you use ",(0,s.jsx)(i.code,{children:"get_target_property(V_SOURCES top VERILOG_SOURCES)"})," you will only get one file, if you want to get the files of all IPs use ",(0,s.jsx)(i.code,{children:"get_ip_sources()"})]})}),"\n",(0,s.jsx)(i.p,{children:"We can see that the order of the printed files is respected and that the lowest hierarchy IPs files are first."}),"\n",(0,s.jsx)(i.admonition,{type:"tip",children:(0,s.jsxs)(i.p,{children:["Running ",(0,s.jsx)(i.code,{children:"make graphviz"})," on the previous example will generate the graph shown above"]})}),"\n",(0,s.jsx)(i.admonition,{type:"tip",children:(0,s.jsx)(i.p,{children:"It is recommended to keep libraries in separate directories and CMakeLists.txt files, and ideally on their own GIT repositories."})})]})}function x(e={}){const{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(g,{...e})}):g(e)}},7958:(e,i,n)=>{"use strict";n.d(i,{A:()=>s});const s='cmake_minimum_required(VERSION 3.25)\nproject(example \n LANGUAGES NONE\n VERSION 0.0.1)\n\ninclude("deps/deps.cmake")\n# highlight-next-line\nset(SOCMAKE_NOWARN_VLNV TRUE) # Do not warn incomplete VLNV format\n\n## Define IP TOP\n# highlight-next-line\nadd_ip(top)\nip_sources(top VERILOG\n ${PROJECT_SOURCE_DIR}/top.v\n )\n\n# Define IP prim10\n# highlight-next-line\nadd_ip(prim10)\nip_sources(prim10 VERILOG\n ${PROJECT_SOURCE_DIR}/prim10.v\n )\n\n## Define IP prim11\n# highlight-next-line\nadd_ip(prim11)\nip_sources(prim11 VERILOG\n ${PROJECT_SOURCE_DIR}/prim11.v\n )\n\n## Define IP prim00\n# highlight-next-line\nadd_ip(prim00)\nip_sources(prim00 VERILOG\n ${PROJECT_SOURCE_DIR}/prim00.v\n )\n\n## Define IP prim01\nadd_ip(prim01)\nip_sources(prim01 VERILOG\n ${PROJECT_SOURCE_DIR}/prim01.v\n )\n\n# highlight-start\nip_link(top prim10 prim11)\nip_link(prim10 prim00)\nip_link(prim11 prim00 prim01)\n# highlight-end\n\n# Get Verilog sources\nget_ip_sources(V_SOURCES top VERILOG)\n# Just print sources\nstring(REPLACE ";" "\\n " V_SOURCES "${V_SOURCES}")\nmessage("V_SOURCES: \\n ${V_SOURCES}")\n'},3443:(e,i,n)=>{"use strict";n.d(i,{A:()=>s});const s='digraph "example" {\nnode [\n fontsize = "12"\n];\n\n\n\n "node3" [ label = "prim00", shape = pentagon ];\n "node4" [ label = "prim01", shape = pentagon ];\n "node5" [ label = "prim10", shape = pentagon ];\n "node5" -> "node3" [ style = dashed ] // prim10 -> prim00\n "node6" [ label = "prim11", shape = pentagon ];\n "node6" -> "node3" [ style = dashed ] // prim11 -> prim00\n "node6" -> "node4" [ style = dashed ] // prim11 -> prim01\n "node7" [ label = "top", shape = pentagon ];\n "node7" -> "node5" [ style = dashed ] // top -> prim10\n "node7" -> "node6" [ style = dashed ] // top -> prim11\n}\n'},2938:()=>{},6120:()=>{},6984:()=>{}}]); \ No newline at end of file diff --git a/assets/js/0e384e19.57eca9d7.js b/assets/js/0e384e19.57eca9d7.js new file mode 100644 index 0000000..e1b7418 --- /dev/null +++ b/assets/js/0e384e19.57eca9d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[976],{1512:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>a});var t=s(4848),r=s(8453);const o={sidebar_position:1},i="Introduction",d={id:"intro",title:"Introduction",description:"{s.d(n,{A:()=>t});const t=s.p+"assets/images/SoCMakeLogo-0694a0ed53b29d2716fb8ea5a1ffabba.png"},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>d});var t=s(6540);const r={},o=t.createContext(r);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0e384e19.bd90d027.js b/assets/js/0e384e19.bd90d027.js deleted file mode 100644 index 9fb65b9..0000000 --- a/assets/js/0e384e19.bd90d027.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[976],{1512:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});var t=s(4848),r=s(8453);const i={sidebar_position:1},o="Introduction",d={id:"intro",title:"Introduction",description:"{s.d(n,{A:()=>t});const t=s.p+"assets/images/SoCMakeLogo-0694a0ed53b29d2716fb8ea5a1ffabba.png"},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>d});var t=s(6540);const r={},i=t.createContext(r);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2075ce04.fa169829.js b/assets/js/2075ce04.fa169829.js new file mode 100644 index 0000000..a37087c --- /dev/null +++ b/assets/js/2075ce04.fa169829.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[317],{8685:e=>{e.exports=JSON.parse('{"title":"Examples","description":"Simple examples on how to use SoCMake for different tasks","slug":"/category/examples","permalink":"/SoCMake/docs/category/examples","navigation":{"previous":{"title":"Introduction","permalink":"/SoCMake/docs/build_system/intro"},"next":{"title":"Simulation","permalink":"/SoCMake/docs/examples/simulation"}}}')}}]); \ No newline at end of file diff --git a/assets/js/393be207.51509cb1.js b/assets/js/393be207.51509cb1.js deleted file mode 100644 index f0bf9ed..0000000 --- a/assets/js/393be207.51509cb1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[134],{6602:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>l,frontMatter:()=>r,metadata:()=>p,toc:()=>d});var o=t(4848),a=t(8453);const r={title:"Markdown page example"},s="Markdown page example",p={type:"mdx",permalink:"/markdown-page",source:"@site/src/pages/markdown-page.md",title:"Markdown page example",description:"You don't need React to write simple standalone pages.",frontMatter:{title:"Markdown page example"},unlisted:!1},c={},d=[];function i(e){const n={h1:"h1",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"markdown-page-example",children:"Markdown page example"}),"\n",(0,o.jsx)(n.p,{children:"You don't need React to write simple standalone pages."})]})}function l(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>p});var o=t(6540);const a={},r=o.createContext(a);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function p(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/393be207.7494ecd4.js b/assets/js/393be207.7494ecd4.js new file mode 100644 index 0000000..329470e --- /dev/null +++ b/assets/js/393be207.7494ecd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[134],{6602:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>l,frontMatter:()=>r,metadata:()=>p,toc:()=>d});var o=t(4848),a=t(8453);const r={title:"Markdown page example"},s="Markdown page example",p={type:"mdx",permalink:"/SoCMake/markdown-page",source:"@site/src/pages/markdown-page.md",title:"Markdown page example",description:"You don't need React to write simple standalone pages.",frontMatter:{title:"Markdown page example"},unlisted:!1},c={},d=[];function i(e){const n={h1:"h1",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"markdown-page-example",children:"Markdown page example"}),"\n",(0,o.jsx)(n.p,{children:"You don't need React to write simple standalone pages."})]})}function l(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>p});var o=t(6540);const a={},r=o.createContext(a);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function p(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/456dc1ab.4f646dca.js b/assets/js/456dc1ab.4f646dca.js deleted file mode 100644 index 53fa8ba..0000000 --- a/assets/js/456dc1ab.4f646dca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[233],{7597:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>I,contentTitle:()=>T,default:()=>E,frontMatter:()=>N,metadata:()=>A,toc:()=>w});var a=t(4848),s=t(8453),r=t(6540),i=t(8215),c=t(3104),l=t(6347),o=t(205),d=t(7485),u=t(1682),h=t(9466);function p(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,u.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function g(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,d.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function C(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=m(e),[i,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!g({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:s}))),[l,d]=f({queryString:t,groupId:a}),[u,p]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,h.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),C=(()=>{const e=l??u;return g({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{C&&c(C)}),[C]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!g({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),d(e),p(e)}),[d,p,s]),tabValues:s}}var k=t(2303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:s,selectValue:r,tabValues:l}=e;const o=[],{blockElementScrollPositionUntilNextRender:d}=(0,c.a_)(),u=e=>{const n=e.currentTarget,t=o.indexOf(n),a=l[t].value;a!==s&&(d(n),r(a))},h=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,a.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,a.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:h,onClick:u,...r,className:(0,i.A)("tabs__item",x.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:s}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,a.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function j(e){const n=C(e);return(0,a.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,a.jsx)(b,{...e,...n}),(0,a.jsx)(_,{...e,...n})]})}function M(e){const n=(0,k.A)();return(0,a.jsx)(j,{...e,children:p(e.children)},String(n))}const O={tabItem:"tabItem_Ymn6"};function v(e){let{children:n,hidden:t,className:s}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,i.A)(O.tabItem,s),hidden:t,children:n})}const N={sidebar_position:2},T="Getting Started",A={id:"getting_started",title:"Getting Started",description:"The SoCMake source code is available on the following link.",source:"@site/docs/getting_started.mdx",sourceDirName:".",slug:"/getting_started",permalink:"/docs/getting_started",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/getting_started.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"API documentation",permalink:"/docs/api_documentation"},next:{title:"Build System",permalink:"/docs/category/build-system"}},I={},w=[{value:"Dependencies",id:"dependencies",level:2},{value:"Usage",id:"usage",level:2},{value:"deps/deps.cmake",id:"depsdepscmake",level:3},{value:"CMakeLists.txt",id:"cmakeliststxt",level:3},{value:"Directory structure",id:"directory-structure",level:3},{value:"Running CMake",id:"running-cmake",level:3}];function S(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"getting-started",children:"Getting Started"}),"\n",(0,a.jsxs)(n.p,{children:["The SoCMake source code is available on the following ",(0,a.jsx)(n.a,{href:"https://gitlab.cern.ch/socmake/SoCMake",children:"link"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"dependencies",children:"Dependencies"}),"\n",(0,a.jsxs)(n.p,{children:["Only mandatory SoCMake dependencies are ",(0,a.jsx)(n.code,{children:"CMake>=3.25.0"})," and ",(0,a.jsx)(n.code,{children:"make"}),"."]}),"\n","\n","\n",(0,a.jsxs)(M,{children:[(0,a.jsx)(v,{value:"PIP",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"pip install cmake==3.26.3\n"})})}),(0,a.jsx)(v,{value:"WGET",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.sh\nchmod +x cmake-3.26.3-linux-x86_64.sh\n./cmake-3.26.3-linux-x86_64.sh --skip-license --prefix=$(pwd)/cmake\nexport PATH=$(pwd)/cmake/bin:$PATH\n"})})}),(0,a.jsx)(v,{value:"APT",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"apt-get install cmake\n"})})})]}),"\n",(0,a.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsxs)(n.p,{children:["Since ",(0,a.jsx)(n.code,{children:"SoCMake"})," runs on CMake scripting language, no installation is required. ",(0,a.jsx)("br",{}),"\nIt is recommended to fetch the SoCMake locally within your ",(0,a.jsx)(n.code,{children:"CMake"})," project. ",(0,a.jsx)("br",{}),"\nThere are multiple ways to add SoCMake within project, 2 of them are with ",(0,a.jsx)(n.code,{children:"CPM"})," or inbuilt ",(0,a.jsx)(n.code,{children:"FetchContent"}),".\nIn both cases SoCMake will be downloaded during configuration phase of the project, only the first time."]}),"\n",(0,a.jsxs)(n.p,{children:["It is recommended to create a file ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"})," with the content from one of the 2 options:"]}),"\n",(0,a.jsx)(n.h3,{id:"depsdepscmake",children:"deps/deps.cmake"}),"\n",(0,a.jsxs)(M,{children:[(0,a.jsxs)(v,{value:"FetchContent",children:[(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/deps.cmake" showLineNumbers',children:'include(FetchContent)\n\nFetchContent_Declare(SoCMake\n GIT_REPOSITORY "ssh://git@gitlab.cern.ch:7999/socrates/SoCMake.git"\n GIT_TAG master # You can define GIT_TAG or GIT_COMMIT for specific versions\n)\n\nFetchContent_MakeAvailable(SoCMake)\n'})}),(0,a.jsx)(n.p,{children:"FetchContent is a built in CMake function for handling dependencies."})]}),(0,a.jsxs)(v,{value:"CPM.cmake",children:[(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/deps.cmake" showLineNumbers',children:'set(CPM_DOWNLOAD_VERSION 0.38.1) # Define CPM version to be downloaded\ninclude(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) # Include the CPM.cmake downloader\n\nCPMAddPackage( # Add SoCMake as a package\n NAME SoCMake\n GIT_TAG master # You can define GIT_TAG or VERSION for versioning\n GIT_REPOSITORY "ssh://git@gitlab.cern.ch:7999/socrates/SoCMake.git" # GIT_REPOSITORY or URL\n )\n'})}),(0,a.jsx)(n.p,{children:"This is the recomended way of adding SoCMake."}),(0,a.jsxs)(n.p,{children:["In the line 2 we are including ",(0,a.jsx)(n.code,{children:"deps/CPM.cmake"})," installation script, which needs to be placed in the repository."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/CPM.cmake"',children:'if(CPM_SOURCE_CACHE)\n set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nelseif(DEFINED ENV{CPM_SOURCE_CACHE})\n set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nelse()\n set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nendif()\n\n# Expand relative path. This is important if the provided path contains a tilde (~)\nget_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)\n\nfunction(download_cpm)\n message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")\n file(DOWNLOAD\n https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake\n ${CPM_DOWNLOAD_LOCATION}\n )\nendfunction()\n\nif(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))\n download_cpm()\nelse()\n # resume download if it previously failed\n file(READ ${CPM_DOWNLOAD_LOCATION} check)\n if("${check}" STREQUAL "")\n download_cpm()\n endif()\n unset(check)\nendif()\n\ninclude(${CPM_DOWNLOAD_LOCATION})\n'})})]})]}),"\n",(0,a.jsx)(n.h3,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,a.jsxs)(n.p,{children:["In the main ",(0,a.jsx)(n.code,{children:"CMakeLists.txt"})," include ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"}),".\nIt should look like this:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",children:'cmake_minimum_required(VERSION 3.25)\nproject(example NONE)\n\ninclude("deps/deps.cmake")\n'})}),"\n",(0,a.jsx)(n.p,{children:"After the previous code block, all of the SoCMake functions are available."}),"\n",(0,a.jsx)(n.h3,{id:"directory-structure",children:"Directory structure"}),"\n",(0,a.jsx)(n.p,{children:"The directory tree of the project should look like this"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",children:"\u251c\u2500\u2500 CMakeLists.txt\n\u2514\u2500\u2500 deps\n \u251c\u2500\u2500 CPM.cmake\n \u2514\u2500\u2500 deps.cmake\n"})}),"\n",(0,a.jsx)(n.h3,{id:"running-cmake",children:"Running CMake"}),"\n",(0,a.jsxs)(n.p,{children:["Since CMake is endorsing out-of-source builds, meaning that the source files and build artifacts are in separate directories.\nWe are creating a ",(0,a.jsx)(n.code,{children:"build"})," directory."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"mkdir build\ncd build\ncmake ../\n"})}),"\n",(0,a.jsx)(n.p,{children:"After executing CMake we should ge the following messages:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-- Downloading CPM.cmake to .../build/cmake/CPM_0.38.1.cmake\n-- CPM: Adding package SoCMake@ (master)\n-- Configuring done\n-- Generating done\n-- Build files have been written to: .../build\n"})}),"\n",(0,a.jsxs)(n.p,{children:["By default the packages will be downloaded in ",(0,a.jsx)(n.code,{children:"${CMAKE_BINARY_DIR}/_deps/"}),".\nThis is possible to change by setting ",(0,a.jsx)(n.a,{href:"https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_BASE_DIR",children:(0,a.jsx)(n.code,{children:"FETCHCONTENT_BASE_DIR"})})," before the first ",(0,a.jsx)(n.code,{children:"CPMAddPackage"})," command."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["For larger projects it is recommended to set ",(0,a.jsx)(n.code,{children:"set(FETCHCONTENT_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}/_deps)"})," in ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"}),", this will download all the dependencies git repository wide, so they will be available from different subdirectories like ",(0,a.jsx)(n.code,{children:"verification"}),", ",(0,a.jsx)(n.code,{children:"documentation"})," etc..."]})}),"\n",(0,a.jsx)(n.p,{children:"The previous example only set up the project, but we didnt add any design files or added any targets.\nJump to the Examples page next."})]})}function E(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(S,{...e})}):S(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var a=t(6540);const s={},r=a.createContext(s);function i(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/456dc1ab.e67f1e70.js b/assets/js/456dc1ab.e67f1e70.js new file mode 100644 index 0000000..bdfd8db --- /dev/null +++ b/assets/js/456dc1ab.e67f1e70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[233],{7597:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>I,contentTitle:()=>T,default:()=>E,frontMatter:()=>N,metadata:()=>A,toc:()=>S});var a=t(4848),s=t(8453),r=t(6540),i=t(8215),c=t(3104),l=t(6347),o=t(205),d=t(7485),u=t(1682),h=t(9466);function p(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,u.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function g(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,d.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function C(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=m(e),[i,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!g({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:s}))),[l,d]=f({queryString:t,groupId:a}),[u,p]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,h.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),C=(()=>{const e=l??u;return g({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{C&&c(C)}),[C]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!g({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),d(e),p(e)}),[d,p,s]),tabValues:s}}var k=t(2303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:s,selectValue:r,tabValues:l}=e;const o=[],{blockElementScrollPositionUntilNextRender:d}=(0,c.a_)(),u=e=>{const n=e.currentTarget,t=o.indexOf(n),a=l[t].value;a!==s&&(d(n),r(a))},h=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,a.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,a.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:h,onClick:u,...r,className:(0,i.A)("tabs__item",x.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:s}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,a.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function j(e){const n=C(e);return(0,a.jsxs)("div",{className:(0,i.A)("tabs-container",x.tabList),children:[(0,a.jsx)(b,{...e,...n}),(0,a.jsx)(_,{...e,...n})]})}function M(e){const n=(0,k.A)();return(0,a.jsx)(j,{...e,children:p(e.children)},String(n))}const O={tabItem:"tabItem_Ymn6"};function v(e){let{children:n,hidden:t,className:s}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,i.A)(O.tabItem,s),hidden:t,children:n})}const N={sidebar_position:2},T="Getting Started",A={id:"getting_started",title:"Getting Started",description:"The SoCMake source code is available on the following link.",source:"@site/docs/getting_started.mdx",sourceDirName:".",slug:"/getting_started",permalink:"/SoCMake/docs/getting_started",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/getting_started.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"API documentation",permalink:"/SoCMake/docs/api_documentation"},next:{title:"Build System",permalink:"/SoCMake/docs/category/build-system"}},I={},S=[{value:"Dependencies",id:"dependencies",level:2},{value:"Usage",id:"usage",level:2},{value:"deps/deps.cmake",id:"depsdepscmake",level:3},{value:"CMakeLists.txt",id:"cmakeliststxt",level:3},{value:"Directory structure",id:"directory-structure",level:3},{value:"Running CMake",id:"running-cmake",level:3}];function w(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"getting-started",children:"Getting Started"}),"\n",(0,a.jsxs)(n.p,{children:["The SoCMake source code is available on the following ",(0,a.jsx)(n.a,{href:"https://gitlab.cern.ch/socmake/SoCMake",children:"link"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"dependencies",children:"Dependencies"}),"\n",(0,a.jsxs)(n.p,{children:["Only mandatory SoCMake dependencies are ",(0,a.jsx)(n.code,{children:"CMake>=3.25.0"})," and ",(0,a.jsx)(n.code,{children:"make"}),"."]}),"\n","\n","\n",(0,a.jsxs)(M,{children:[(0,a.jsx)(v,{value:"PIP",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"pip install cmake==3.26.3\n"})})}),(0,a.jsx)(v,{value:"WGET",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.sh\nchmod +x cmake-3.26.3-linux-x86_64.sh\n./cmake-3.26.3-linux-x86_64.sh --skip-license --prefix=$(pwd)/cmake\nexport PATH=$(pwd)/cmake/bin:$PATH\n"})})}),(0,a.jsx)(v,{value:"APT",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"apt-get install cmake\n"})})})]}),"\n",(0,a.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsxs)(n.p,{children:["Since ",(0,a.jsx)(n.code,{children:"SoCMake"})," runs on CMake scripting language, no installation is required. ",(0,a.jsx)("br",{}),"\nIt is recommended to fetch the SoCMake locally within your ",(0,a.jsx)(n.code,{children:"CMake"})," project. ",(0,a.jsx)("br",{}),"\nThere are multiple ways to add SoCMake within project, 2 of them are with ",(0,a.jsx)(n.code,{children:"CPM"})," or inbuilt ",(0,a.jsx)(n.code,{children:"FetchContent"}),".\nIn both cases SoCMake will be downloaded during configuration phase of the project, only the first time."]}),"\n",(0,a.jsxs)(n.p,{children:["It is recommended to create a file ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"})," with the content from one of the 2 options:"]}),"\n",(0,a.jsx)(n.h3,{id:"depsdepscmake",children:"deps/deps.cmake"}),"\n",(0,a.jsxs)(M,{children:[(0,a.jsxs)(v,{value:"FetchContent",children:[(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/deps.cmake" showLineNumbers',children:'include(FetchContent)\n\nFetchContent_Declare(SoCMake\n GIT_REPOSITORY "ssh://git@gitlab.cern.ch:7999/socrates/SoCMake.git"\n GIT_TAG master # You can define GIT_TAG or GIT_COMMIT for specific versions\n)\n\nFetchContent_MakeAvailable(SoCMake)\n'})}),(0,a.jsx)(n.p,{children:"FetchContent is a built in CMake function for handling dependencies."})]}),(0,a.jsxs)(v,{value:"CPM.cmake",children:[(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/deps.cmake" showLineNumbers',children:'set(CPM_DOWNLOAD_VERSION 0.38.1) # Define CPM version to be downloaded\ninclude(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) # Include the CPM.cmake downloader\n\nCPMAddPackage( # Add SoCMake as a package\n NAME SoCMake\n GIT_TAG master # You can define GIT_TAG or VERSION for versioning\n GIT_REPOSITORY "ssh://git@gitlab.cern.ch:7999/socrates/SoCMake.git" # GIT_REPOSITORY or URL\n )\n'})}),(0,a.jsx)(n.p,{children:"This is the recomended way of adding SoCMake."}),(0,a.jsxs)(n.p,{children:["In the line 2 we are including ",(0,a.jsx)(n.code,{children:"deps/CPM.cmake"})," installation script, which needs to be placed in the repository."]}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",metastring:'title="deps/CPM.cmake"',children:'if(CPM_SOURCE_CACHE)\n set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nelseif(DEFINED ENV{CPM_SOURCE_CACHE})\n set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nelse()\n set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")\nendif()\n\n# Expand relative path. This is important if the provided path contains a tilde (~)\nget_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)\n\nfunction(download_cpm)\n message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")\n file(DOWNLOAD\n https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake\n ${CPM_DOWNLOAD_LOCATION}\n )\nendfunction()\n\nif(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))\n download_cpm()\nelse()\n # resume download if it previously failed\n file(READ ${CPM_DOWNLOAD_LOCATION} check)\n if("${check}" STREQUAL "")\n download_cpm()\n endif()\n unset(check)\nendif()\n\ninclude(${CPM_DOWNLOAD_LOCATION})\n'})})]})]}),"\n",(0,a.jsx)(n.h3,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,a.jsxs)(n.p,{children:["In the main ",(0,a.jsx)(n.code,{children:"CMakeLists.txt"})," include ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"}),".\nIt should look like this:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",children:'cmake_minimum_required(VERSION 3.25)\nproject(example NONE)\n\ninclude("deps/deps.cmake")\n'})}),"\n",(0,a.jsx)(n.p,{children:"After the previous code block, all of the SoCMake functions are available."}),"\n",(0,a.jsx)(n.h3,{id:"directory-structure",children:"Directory structure"}),"\n",(0,a.jsx)(n.p,{children:"The directory tree of the project should look like this"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-cmake",children:"\u251c\u2500\u2500 CMakeLists.txt\n\u2514\u2500\u2500 deps\n \u251c\u2500\u2500 CPM.cmake\n \u2514\u2500\u2500 deps.cmake\n"})}),"\n",(0,a.jsx)(n.h3,{id:"running-cmake",children:"Running CMake"}),"\n",(0,a.jsxs)(n.p,{children:["Since CMake is endorsing out-of-source builds, meaning that the source files and build artifacts are in separate directories.\nWe are creating a ",(0,a.jsx)(n.code,{children:"build"})," directory."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"mkdir build\ncd build\ncmake ../\n"})}),"\n",(0,a.jsx)(n.p,{children:"After executing CMake we should ge the following messages:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-- Downloading CPM.cmake to .../build/cmake/CPM_0.38.1.cmake\n-- CPM: Adding package SoCMake@ (master)\n-- Configuring done\n-- Generating done\n-- Build files have been written to: .../build\n"})}),"\n",(0,a.jsxs)(n.p,{children:["By default the packages will be downloaded in ",(0,a.jsx)(n.code,{children:"${CMAKE_BINARY_DIR}/_deps/"}),".\nThis is possible to change by setting ",(0,a.jsx)(n.a,{href:"https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_BASE_DIR",children:(0,a.jsx)(n.code,{children:"FETCHCONTENT_BASE_DIR"})})," before the first ",(0,a.jsx)(n.code,{children:"CPMAddPackage"})," command."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["For larger projects it is recommended to set ",(0,a.jsx)(n.code,{children:"set(FETCHCONTENT_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}/_deps)"})," in ",(0,a.jsx)(n.code,{children:"deps/deps.cmake"}),", this will download all the dependencies git repository wide, so they will be available from different subdirectories like ",(0,a.jsx)(n.code,{children:"verification"}),", ",(0,a.jsx)(n.code,{children:"documentation"})," etc..."]})}),"\n",(0,a.jsx)(n.p,{children:"The previous example only set up the project, but we didnt add any design files or added any targets.\nJump to the Examples page next."})]})}function E(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(w,{...e})}):w(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var a=t(6540);const s={},r=a.createContext(s);function i(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4a070847.794ae60d.js b/assets/js/4a070847.794ae60d.js deleted file mode 100644 index 34e2fab..0000000 --- a/assets/js/4a070847.794ae60d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[502],{3991:e=>{e.exports=JSON.parse('{"title":"Examples","description":"Simple examples on how to use SoCMake for different tasks","slug":"/category/examples","permalink":"/docs/category/examples","navigation":{"previous":{"title":"Introduction","permalink":"/docs/build_system/intro"},"next":{"title":"Simulation","permalink":"/docs/examples/simulation"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.29d60ef3.js b/assets/js/935f2afb.29d60ef3.js deleted file mode 100644 index 536fee5..0000000 --- a/assets/js/935f2afb.29d60ef3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/docs/intro","docId":"intro","unlisted":false},{"type":"link","label":"API documentation","href":"/docs/api_documentation","docId":"api_documentation","unlisted":false},{"type":"link","label":"Getting Started","href":"/docs/getting_started","docId":"getting_started","unlisted":false},{"type":"category","label":"Build System","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Introduction","href":"/docs/build_system/intro","docId":"build_system/intro","unlisted":false}],"href":"/docs/category/build-system"},{"type":"category","label":"Examples","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Simulation","href":"/docs/examples/simulation","docId":"examples/simulation","unlisted":false},{"type":"link","label":"Hierarchical design","href":"/docs/examples/linking_ips","docId":"examples/linking_ips","unlisted":false},{"type":"link","label":"Verilator C++ testbench","href":"/docs/examples/verilator","docId":"examples/verilator","unlisted":false}],"href":"/docs/category/examples"}]},"docs":{"api_documentation":{"id":"api_documentation","title":"API documentation","description":"SoCMake API documentation.","sidebar":"tutorialSidebar"},"build_system/intro":{"id":"build_system/intro","title":"Introduction","description":"SoCMake is built on top of CMake.","sidebar":"tutorialSidebar"},"examples/linking_ips":{"id":"examples/linking_ips","title":"Hierarchical design","description":"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.","sidebar":"tutorialSidebar"},"examples/simulation":{"id":"examples/simulation","title":"Simulation","description":"In the previous section Getting Started, we saw how to download SoCMake inside our project.","sidebar":"tutorialSidebar"},"examples/verilator":{"id":"examples/verilator","title":"Verilator C++ testbench","description":"Description","sidebar":"tutorialSidebar"},"getting_started":{"id":"getting_started","title":"Getting Started","description":"The SoCMake source code is available on the following link.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/SoCMake/docs/intro","docId":"intro","unlisted":false},{"type":"link","label":"API documentation","href":"/SoCMake/docs/api_documentation","docId":"api_documentation","unlisted":false},{"type":"link","label":"Getting Started","href":"/SoCMake/docs/getting_started","docId":"getting_started","unlisted":false},{"type":"category","label":"Build System","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Introduction","href":"/SoCMake/docs/build_system/intro","docId":"build_system/intro","unlisted":false}],"href":"/SoCMake/docs/category/build-system"},{"type":"category","label":"Examples","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Simulation","href":"/SoCMake/docs/examples/simulation","docId":"examples/simulation","unlisted":false},{"type":"link","label":"Hierarchical design","href":"/SoCMake/docs/examples/linking_ips","docId":"examples/linking_ips","unlisted":false},{"type":"link","label":"Verilator C++ testbench","href":"/SoCMake/docs/examples/verilator","docId":"examples/verilator","unlisted":false}],"href":"/SoCMake/docs/category/examples"}]},"docs":{"api_documentation":{"id":"api_documentation","title":"API documentation","description":"SoCMake API documentation.","sidebar":"tutorialSidebar"},"build_system/intro":{"id":"build_system/intro","title":"Introduction","description":"SoCMake is built on top of CMake.","sidebar":"tutorialSidebar"},"examples/linking_ips":{"id":"examples/linking_ips","title":"Hierarchical design","description":"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.","sidebar":"tutorialSidebar"},"examples/simulation":{"id":"examples/simulation","title":"Simulation","description":"In the previous section Getting Started, we saw how to download SoCMake inside our project.","sidebar":"tutorialSidebar"},"examples/verilator":{"id":"examples/verilator","title":"Verilator C++ testbench","description":"Description","sidebar":"tutorialSidebar"},"getting_started":{"id":"getting_started","title":"Getting Started","description":"The SoCMake source code is available on the following link.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"{e.exports=JSON.parse('{"title":"Build System","description":"Simple examples on how to use SoCMake for different tasks","slug":"/category/build-system","permalink":"/docs/category/build-system","navigation":{"previous":{"title":"Getting Started","permalink":"/docs/getting_started"},"next":{"title":"Introduction","permalink":"/docs/build_system/intro"}}}')}}]); \ No newline at end of file diff --git a/assets/js/c1b67de1.8c0ca6df.js b/assets/js/c1b67de1.8c0ca6df.js deleted file mode 100644 index be030f8..0000000 --- a/assets/js/c1b67de1.8c0ca6df.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[80],{869:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,cmakelists:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>d,tb_v:()=>h,toc:()=>y});var r=n(4848),i=n(8453),a=n(1432),o=n(3554),s=n.n(o);const l={sidebar_position:1},c="Simulation",d={id:"examples/simulation",title:"Simulation",description:"In the previous section Getting Started, we saw how to download SoCMake inside our project.",source:"@site/docs/examples/simulation.md",sourceDirName:"examples",slug:"/examples/simulation",permalink:"/docs/examples/simulation",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/simulation.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Examples",permalink:"/docs/category/examples"},next:{title:"Hierarchical design",permalink:"/docs/examples/linking_ips"}},u={},h=n(2309).A,p=n(457).A,y=[{value:"tb.v",id:"tbv",level:2},{value:"CMakeLists.txt",id:"cmakeliststxt",level:2},{value:"add_ip()",id:"add_ip",level:3},{value:"ip_sources()",id:"ip_sources",level:3},{value:"iverilog()",id:"iverilog",level:3},{value:"verilator()",id:"verilator",level:3},{value:"Running the example",id:"running-the-example",level:2},{value:"Video example",id:"video-example",level:3},{value:"Instructions",id:"instructions",level:3}];function m(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"simulation",children:"Simulation"}),"\n",(0,r.jsxs)(t.p,{children:["In the previous section ",(0,r.jsx)(t.a,{href:"/docs/getting_started",children:"Getting Started"}),", we saw how to download SoCMake inside our project."]}),"\n",(0,r.jsxs)(t.p,{children:["Let's try to run a simple Verilog testbench now with ",(0,r.jsx)(t.a,{href:"https://github.com/steveicarus/iverilog",children:"Icarus Verilog"})," and/or ",(0,r.jsx)(t.a,{href:"https://github.com/verilator/verilator",children:"Verilator"}),"."]}),"\n",(0,r.jsx)(t.p,{children:"For this step make sure you have Iverilog and/or Verilator installed on your system."}),"\n",(0,r.jsx)(t.p,{children:"Lets create a simple verilog testbench file:"}),"\n","\n","\n",(0,r.jsx)(t.h2,{id:"tbv",children:"tb.v"}),"\n",(0,r.jsx)(t.p,{children:"The following testbench will just print something to the stdout."}),"\n",(0,r.jsx)(a.A,{language:"verilog",title:"tb.v",showLineNumbers:!0,children:h}),"\n",(0,r.jsx)(t.h2,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.code,{children:"CMakeLists.txt"})," will create a library, add sources and create verilator and iverilog Makefile targets."]}),"\n",(0,r.jsx)(a.A,{language:"cmake",title:"CMakeLists.txt",showLineNumbers:!0,children:p}),"\n",(0,r.jsx)(t.h3,{id:"add_ip",children:"add_ip()"}),"\n",(0,r.jsxs)(t.p,{children:["We are creating an ",(0,r.jsx)(t.code,{children:"IP"})," library called ",(0,r.jsx)(t.code,{children:"tb"})," using ",(0,r.jsx)(t.code,{children:"add_ip()"})," function.\nFunction add_ip takes the following arguments:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["First argument is positional ",(0,r.jsx)(t.strong,{children:"NAME"})," of the defined library"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"VENDOR"})," - name of the vendor (your company, organization, ...)"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"LIBRARY"})," - name of the library which the IP is part of"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"VERSION"})," - Version number of the IP"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The library that will be created will hold a name ",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),", there will be also a CMake ",(0,r.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries",children:"alias library"})," that is created with the name ",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["In this a library called ",(0,r.jsx)(t.strong,{children:"cern::ip::tb::0.0.1"})," is created.",(0,r.jsx)("br",{}),"\nThis function also sets ",(0,r.jsx)(t.code,{children:"IP"})," variable in the current scope from where it was called. The IP will hold the non alias full library name."]}),"\n",(0,r.jsx)(t.h3,{id:"ip_sources",children:"ip_sources()"}),"\n",(0,r.jsxs)(t.p,{children:["To add design sources to the ",(0,r.jsx)(t.code,{children:"IP"})," library, we can use ",(0,r.jsx)(t.code,{children:"ip_sources()"})," function.\nThe function takes"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["First argument is positional ",(0,r.jsx)(t.strong,{children:"NAME"})," of the library to add sources to."]}),"\n",(0,r.jsxs)(t.li,{children:["Second argument is positional ",(0,r.jsx)(t.strong,{children:"TYPE"})," and represents the file type to be added."]}),"\n",(0,r.jsxs)(t.li,{children:["Third argument is positional ",(0,r.jsx)(t.strong,{children:"SOURCES"})," and is a list of source files to be added"]}),"\n"]}),"\n",(0,r.jsxs)(t.admonition,{type:"info",children:[(0,r.jsxs)(t.p,{children:["Using just the name of the library ",(0,r.jsx)(t.code,{children:"tb"})," is possible only if the add_ip() call is in the same CMakeLists.txt (subdirectory), and it was the last library added.\nIn other cases you can use:"]}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"${IP}"})," same as ",(0,r.jsx)(t.code,{children:"tb"}),", should be in same subdirectory and last library added"]}),"\n",(0,r.jsxs)(t.li,{children:["Full name ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1"})," (always works, from any subdirectory)"]}),"\n",(0,r.jsxs)(t.li,{children:["Alias libray name ",(0,r.jsx)(t.code,{children:"cern::ip::tb::0.0.1"})," (always works, from any subdirectory)"]}),"\n"]})]}),"\n",(0,r.jsx)(t.h3,{id:"iverilog",children:"iverilog()"}),"\n",(0,r.jsxs)(t.p,{children:["This function will add a target to compile the Icarus Verilog testbench.\nThe name of the created ",(0,r.jsx)(t.code,{children:"Makefile"})," target will be: ",(0,r.jsx)(t.code,{children:"${IP}_iverilog"})," in this case : ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iverilog"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"verilator",children:"verilator()"}),"\n",(0,r.jsxs)(t.p,{children:["This function will add a target to compile the Verilator testbench.\nIn this case because it is a Verilog only testbench, we are passing ",(0,r.jsx)(t.code,{children:"MAIN"})," argument, to let Verilator create a ",(0,r.jsx)(t.code,{children:"main.cpp"})," file for us.",(0,r.jsx)("br",{}),"\nFor a custom C++ testbench checkout the next example."]}),"\n",(0,r.jsxs)(t.p,{children:["The name of the created ",(0,r.jsx)(t.code,{children:"Makefile"})," target will be: ",(0,r.jsx)(t.code,{children:"${IP}_verilate"})," in this case : ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilate"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"running-the-example",children:"Running the example"}),"\n",(0,r.jsx)(t.h3,{id:"video-example",children:"Video example"}),"\n",(0,r.jsx)(t.p,{children:"Checkout the video example below to see how to run the simulation."}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:(0,r.jsx)("strong",{children:"Video demonstration"})}),(0,r.jsx)(s(),{width:"100%",height:"100%",controls:!0,url:"/examples/sim_example.mp4"})]}),"\n",(0,r.jsx)(t.h3,{id:"instructions",children:"Instructions"}),"\n",(0,r.jsx)(t.p,{children:"To run the example we need to create a build directory as always:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"mkdir build\ncd build\n"})}),"\n",(0,r.jsx)(t.p,{children:"Then we generate Makefiles with:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cmake ../\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Now we have ",(0,r.jsx)(t.code,{children:"Makefile"})," in the build directory, which contain generated targets.\nThe targets we are interested in are:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iverilog"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilate"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"To run the simulation we can do:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"make cern__ip__tb__0.0.1_iverilog # Compile with Icarus Verilog`\nmake cern__ip__tb__0.0.1_verilate -j$(nproc) # Compile with Verilator`\n"})}),"\n",(0,r.jsxs)(t.p,{children:["We can compile Verilator testbench with maximum threads with ",(0,r.jsx)(t.code,{children:"-j$(nproc)"})," flag."]}),"\n",(0,r.jsxs)(t.p,{children:["Once we execute one or both of these targets we will have the testbenches compiled as executables and available to run as a normal executables.\nThe executables will be present in ",(0,r.jsx)(t.code,{children:"${PROJECT_BINARY_DIR}"})," in this case ",(0,r.jsx)(t.code,{children:"build"})," directory."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iv"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilator_tb"})}),"\n"]})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach((function(t){i[t]=r(e[t],n)})),a(t).forEach((function(a){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(o(e,a)&&n.isMergeableObject(t[a])?i[a]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(a,n)(e[a],t[a],n):i[a]=r(t[a],n))})),i}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=r;var o=Array.isArray(n);return o===Array.isArray(e)?o?a.arrayMerge(e,n,a):s(e,n,a):r(n,a)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},6147:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function n(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,r,i){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof r&&(i=r,r={}),r=r||{},i=i||function(){},o.type=r.type||"text/javascript",o.charset=r.charset||"utf8",o.async=!("async"in r)||!!r.async,o.src=e,r.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(o,r.attrs),r.text&&(o.text=""+r.text),("onload"in o?t:n)(o,i),o.onload||t(o,i),a.appendChild(o)}},1811:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n{"use strict";n.d(t,{A:()=>r});const r='cmake_minimum_required(VERSION 3.25)\nproject(example NONE)\n\ninclude("deps/deps.cmake")\n\nadd_ip(tb # Name of the IP block\n VENDOR cern # Vendor name (can be ommited, but not recommended)\n LIBRARY ip # Library name (can be ommited, but not recommended)\n VERSION 0.0.1 # Version Number (can be ommited, but not recommended)\n )\n\nip_sources(tb VERILOG # Add source files to the VERILOG file set\n ${PROJECT_SOURCE_DIR}/tb.v\n )\n\niverilog(tb) # Create iverilog target\n\nverilate(tb # Create verilate target\n MAIN # Let Verilator create a main.cpp testbench\n )\n'},2309:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r='module tb;\n initial begin\n $display("Simulated with Iverilog, from SoCMake build system\\n");\n $finish();\n end\n endmodule\n'},8021:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),p={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(p,{default:()=>g}),e.exports=(r=p,d(a({},"__esModule",{value:!0}),r));var y=u(n(6540)),m=u(n(115)),f=n(7604),b=n(5635);class g extends y.Component{constructor(){super(...arguments),h(this,"mounted",!1),h(this,"isReady",!1),h(this,"isPlaying",!1),h(this,"isLoading",!0),h(this,"loadOnReady",null),h(this,"startOnPlay",!0),h(this,"seekOnPlay",null),h(this,"onDurationCalled",!1),h(this,"handlePlayerMount",(e=>{this.player||(this.player=e,this.player.load(this.props.url)),this.progress()})),h(this,"getInternalPlayer",(e=>this.player?this.player[e]:null)),h(this,"progress",(()=>{if(this.props.url&&this.player&&this.isReady){const e=this.getCurrentTime()||0,t=this.getSecondsLoaded(),n=this.getDuration();if(n){const r={playedSeconds:e,played:e/n};null!==t&&(r.loadedSeconds=t,r.loaded=t/n),r.playedSeconds===this.prevPlayed&&r.loadedSeconds===this.prevLoaded||this.props.onProgress(r),this.prevPlayed=r.playedSeconds,this.prevLoaded=r.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)})),h(this,"handleReady",(()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:e,playing:t,volume:n,muted:r}=this.props;e(),r||null===n||this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):t&&this.player.play(),this.handleDurationCheck()})),h(this,"handlePlay",(()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:e,onPlay:t,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&1!==n&&this.player.setPlaybackRate(n),e(),this.startOnPlay=!1),t(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()})),h(this,"handlePause",(e=>{this.isPlaying=!1,this.isLoading||this.props.onPause(e)})),h(this,"handleEnded",(()=>{const{activePlayer:e,loop:t,onEnded:n}=this.props;e.loopOnEnded&&t&&this.seekTo(0),t||(this.isPlaying=!1,n())})),h(this,"handleError",((...e)=>{this.isLoading=!1,this.props.onError(...e)})),h(this,"handleDurationCheck",(()=>{clearTimeout(this.durationCheckTimeout);const e=this.getDuration();e?this.onDurationCalled||(this.props.onDuration(e),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)})),h(this,"handleLoaded",(()=>{this.isLoading=!1}))}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(e){if(!this.player)return;const{url:t,playing:n,volume:r,muted:i,playbackRate:a,pip:o,loop:s,activePlayer:l,disableDeferredLoading:c}=this.props;if(!(0,m.default)(e.url,t)){if(this.isLoading&&!l.forceLoad&&!c&&!(0,b.isMediaStream)(t))return console.warn(`ReactPlayer: the attempt to load ${t} is being deferred until the player has loaded`),void(this.loadOnReady=t);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(t,this.isReady)}e.playing||!n||this.isPlaying||this.player.play(),e.playing&&!n&&this.isPlaying&&this.player.pause(),!e.pip&&o&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!o&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==r&&null!==r&&this.player.setVolume(r),e.muted!==i&&(i?this.player.mute():(this.player.unmute(),null!==r&&setTimeout((()=>this.player.setVolume(r))))),e.playbackRate!==a&&this.player.setPlaybackRate&&this.player.setPlaybackRate(a),e.loop!==s&&this.player.setLoop&&this.player.setLoop(s)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(e,t,n){if(!this.isReady)return void(0!==e&&(this.seekOnPlay=e,setTimeout((()=>{this.seekOnPlay=null}),5e3)));if(t?"fraction"===t:e>0&&e<1){const t=this.player.getDuration();return t?void this.player.seekTo(t*e,n):void console.warn("ReactPlayer: could not seek using fraction \u2013\xa0duration not yet available")}this.player.seekTo(e,n)}render(){const e=this.props.activePlayer;return e?y.default.createElement(e,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}h(g,"displayName","Player"),h(g,"propTypes",f.propTypes),h(g,"defaultProps",f.defaultProps)},5580:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),p={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(p,{createReactPlayer:()=>I}),e.exports=(r=p,d(a({},"__esModule",{value:!0}),r));var y=u(n(6540)),m=u(n(4744)),f=u(n(1811)),b=u(n(115)),g=n(7604),v=n(5635),w=u(n(8021));const P=(0,v.lazy)((()=>n.e(353).then(n.t.bind(n,6734,23)))),j="undefined"!=typeof window&&window.document,x=void 0!==n.g&&n.g.window&&n.g.window.document,_=Object.keys(g.propTypes),O=j||x?y.Suspense:()=>null,k=[],I=(e,t)=>{var n;return n=class extends y.Component{constructor(){super(...arguments),h(this,"state",{showPreview:!!this.props.light}),h(this,"references",{wrapper:e=>{this.wrapper=e},player:e=>{this.player=e}}),h(this,"handleClickPreview",(e=>{this.setState({showPreview:!1}),this.props.onClickPreview(e)})),h(this,"showPreview",(()=>{this.setState({showPreview:!0})})),h(this,"getDuration",(()=>this.player?this.player.getDuration():null)),h(this,"getCurrentTime",(()=>this.player?this.player.getCurrentTime():null)),h(this,"getSecondsLoaded",(()=>this.player?this.player.getSecondsLoaded():null)),h(this,"getInternalPlayer",((e="player")=>this.player?this.player.getInternalPlayer(e):null)),h(this,"seekTo",((e,t,n)=>{if(!this.player)return null;this.player.seekTo(e,t,n)})),h(this,"handleReady",(()=>{this.props.onReady(this)})),h(this,"getActivePlayer",(0,f.default)((n=>{for(const t of[...k,...e])if(t.canPlay(n))return t;return t||null}))),h(this,"getConfig",(0,f.default)(((e,t)=>{const{config:n}=this.props;return m.default.all([g.defaultProps.config,g.defaultProps.config[t]||{},n,n[t]||{}])}))),h(this,"getAttributes",(0,f.default)((e=>(0,v.omit)(this.props,_)))),h(this,"renderActivePlayer",(e=>{if(!e)return null;const t=this.getActivePlayer(e);if(!t)return null;const n=this.getConfig(e,t.key);return y.default.createElement(w.default,{...this.props,key:t.key,ref:this.references.player,config:n,activePlayer:t.lazyPlayer||t,onReady:this.handleReady})}))}shouldComponentUpdate(e,t){return!(0,b.default)(this.props,e)||!(0,b.default)(this.state,t)}componentDidUpdate(e){const{light:t}=this.props;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}renderPreview(e){if(!e)return null;const{light:t,playIcon:n,previewTabIndex:r,oEmbedUrl:i}=this.props;return y.default.createElement(P,{url:e,light:t,playIcon:n,previewTabIndex:r,oEmbedUrl:i,onClick:this.handleClickPreview})}render(){const{url:e,style:t,width:n,height:r,fallback:i,wrapper:a}=this.props,{showPreview:o}=this.state,s=this.getAttributes(e),l="string"==typeof a?this.references.wrapper:void 0;return y.default.createElement(a,{ref:l,style:{...t,width:n,height:r},...s},y.default.createElement(O,{fallback:i},o?this.renderPreview(e):this.renderActivePlayer(e)))}},h(n,"displayName","ReactPlayer"),h(n,"propTypes",g.propTypes),h(n,"defaultProps",g.defaultProps),h(n,"addCustomPlayer",(e=>{k.push(e)})),h(n,"removeCustomPlayers",(()=>{k.length=0})),h(n,"canPlay",(t=>{for(const n of[...k,...e])if(n.canPlay(t))return!0;return!1})),h(n,"canEnablePIP",(t=>{for(const n of[...k,...e])if(n.canEnablePIP&&n.canEnablePIP(t))return!0;return!1})),n}},3554:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{default:()=>m}),e.exports=(r=u,d(a({},"__esModule",{value:!0}),r));var h=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(7015)),p=n(5580);const y=h.default[h.default.length-1];var m=(0,p.createReactPlayer)(h.default,y)},327:(e,t,n)=>{var r,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(l,{AUDIO_EXTENSIONS:()=>x,DASH_EXTENSIONS:()=>k,FLV_EXTENSIONS:()=>I,HLS_EXTENSIONS:()=>O,MATCH_URL_DAILYMOTION:()=>v,MATCH_URL_FACEBOOK:()=>p,MATCH_URL_FACEBOOK_WATCH:()=>y,MATCH_URL_KALTURA:()=>j,MATCH_URL_MIXCLOUD:()=>w,MATCH_URL_SOUNDCLOUD:()=>u,MATCH_URL_STREAMABLE:()=>m,MATCH_URL_TWITCH_CHANNEL:()=>g,MATCH_URL_TWITCH_VIDEO:()=>b,MATCH_URL_VIDYARD:()=>P,MATCH_URL_VIMEO:()=>h,MATCH_URL_WISTIA:()=>f,MATCH_URL_YOUTUBE:()=>d,VIDEO_EXTENSIONS:()=>_,canPlay:()=>E}),e.exports=(r=l,((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===n||i(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e})(i({},"__esModule",{value:!0}),r));var c=n(5635);const d=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,u=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,h=/vimeo\.com\/(?!progressive_redirect).+/,p=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,y=/^https?:\/\/fb\.watch\/.+$/,m=/streamable\.com\/([a-z0-9]+)$/,f=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,b=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,g=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,v=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,w=/mixcloud\.com\/([^/]+\/[^/]+)/,P=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,j=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,x=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,_=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,O=/\.(m3u8)($|\?)/i,k=/\.(mpd)($|\?)/i,I=/\.(flv)($|\?)/i,T=e=>{if(e instanceof Array){for(const t of e){if("string"==typeof t&&T(t))return!0;if(T(t.src))return!0}return!1}return!(!(0,c.isMediaStream)(e)&&!(0,c.isBlobUrl)(e))||(x.test(e)||_.test(e)||O.test(e)||k.test(e)||I.test(e))},E={youtube:e=>e instanceof Array?e.every((e=>d.test(e))):d.test(e),soundcloud:e=>u.test(e)&&!x.test(e),vimeo:e=>h.test(e)&&!_.test(e)&&!O.test(e),facebook:e=>p.test(e)||y.test(e),streamable:e=>m.test(e),wistia:e=>f.test(e),twitch:e=>b.test(e)||g.test(e),dailymotion:e=>v.test(e),mixcloud:e=>w.test(e),vidyard:e=>P.test(e),kaltura:e=>j.test(e),file:T}},7015:(e,t,n)=>{Object.create;var r,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),l=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===n||i(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e},c={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(c,{default:()=>h}),e.exports=(r=c,l(i({},"__esModule",{value:!0}),r));var d=n(5635),u=n(327),h=[{key:"youtube",name:"YouTube",canPlay:u.canPlay.youtube,lazyPlayer:(0,d.lazy)((()=>n.e(446).then(n.t.bind(n,2910,23))))},{key:"soundcloud",name:"SoundCloud",canPlay:u.canPlay.soundcloud,lazyPlayer:(0,d.lazy)((()=>n.e(979).then(n.t.bind(n,3127,23))))},{key:"vimeo",name:"Vimeo",canPlay:u.canPlay.vimeo,lazyPlayer:(0,d.lazy)((()=>n.e(173).then(n.t.bind(n,1423,23))))},{key:"facebook",name:"Facebook",canPlay:u.canPlay.facebook,lazyPlayer:(0,d.lazy)((()=>n.e(887).then(n.t.bind(n,1343,23))))},{key:"streamable",name:"Streamable",canPlay:u.canPlay.streamable,lazyPlayer:(0,d.lazy)((()=>n.e(627).then(n.t.bind(n,9643,23))))},{key:"wistia",name:"Wistia",canPlay:u.canPlay.wistia,lazyPlayer:(0,d.lazy)((()=>n.e(340).then(n.t.bind(n,3330,23))))},{key:"twitch",name:"Twitch",canPlay:u.canPlay.twitch,lazyPlayer:(0,d.lazy)((()=>n.e(42).then(n.t.bind(n,1400,23))))},{key:"dailymotion",name:"DailyMotion",canPlay:u.canPlay.dailymotion,lazyPlayer:(0,d.lazy)((()=>n.e(328).then(n.t.bind(n,9348,23))))},{key:"mixcloud",name:"Mixcloud",canPlay:u.canPlay.mixcloud,lazyPlayer:(0,d.lazy)((()=>n.e(570).then(n.t.bind(n,3276,23))))},{key:"vidyard",name:"Vidyard",canPlay:u.canPlay.vidyard,lazyPlayer:(0,d.lazy)((()=>n.e(392).then(n.t.bind(n,3552,23))))},{key:"kaltura",name:"Kaltura",canPlay:u.canPlay.kaltura,lazyPlayer:(0,d.lazy)((()=>n.e(463).then(n.t.bind(n,7945,23))))},{key:"file",name:"FilePlayer",canPlay:u.canPlay.file,canEnablePIP:e=>u.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,d.supportsWebKitPresentationMode)())&&!u.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,d.lazy)((()=>n.e(458).then(n.t.bind(n,688,23))))}]},7604:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{defaultProps:()=>_,propTypes:()=>j}),e.exports=(r=u,d(a({},"__esModule",{value:!0}),r));var h=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(5556));const{string:p,bool:y,number:m,array:f,oneOfType:b,shape:g,object:v,func:w,node:P}=h.default,j={url:b([p,f,v]),playing:y,loop:y,controls:y,volume:m,muted:y,playbackRate:m,width:b([p,m]),height:b([p,m]),style:v,progressInterval:m,playsinline:y,pip:y,stopOnUnmount:y,light:b([y,p,v]),playIcon:P,previewTabIndex:m,fallback:P,oEmbedUrl:p,wrapper:b([p,w,g({render:w.isRequired})]),config:g({soundcloud:g({options:v}),youtube:g({playerVars:v,embedOptions:v,onUnstarted:w}),facebook:g({appId:p,version:p,playerId:p,attributes:v}),dailymotion:g({params:v}),vimeo:g({playerOptions:v,title:p}),file:g({attributes:v,tracks:f,forceVideo:y,forceAudio:y,forceHLS:y,forceSafariHLS:y,forceDisableHls:y,forceDASH:y,forceFLV:y,hlsOptions:v,hlsVersion:p,dashVersion:p,flvVersion:p}),wistia:g({options:v,playerId:p,customControls:f}),mixcloud:g({options:v}),twitch:g({options:v,playerId:p}),vidyard:g({options:v})}),onReady:w,onStart:w,onPlay:w,onPause:w,onBuffer:w,onBufferEnd:w,onEnded:w,onError:w,onDuration:w,onSeek:w,onPlaybackRateChange:w,onPlaybackQualityChange:w,onProgress:w,onClickPreview:w,onEnablePIP:w,onDisablePIP:w},x=()=>{},_={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:x},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:x,onStart:x,onPlay:x,onPause:x,onBuffer:x,onBufferEnd:x,onEnded:x,onError:x,onDuration:x,onSeek:x,onPlaybackRateChange:x,onPlaybackQualityChange:x,onProgress:x,onClickPreview:x,onEnablePIP:x,onDisablePIP:x}},5635:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(h,{callPlayer:()=>S,getConfig:()=>E,getSDK:()=>T,isBlobUrl:()=>M,isMediaStream:()=>C,lazy:()=>f,omit:()=>R,parseEndTime:()=>x,parseStartTime:()=>j,queryString:()=>O,randomString:()=>_,supportsWebKitPresentationMode:()=>A}),e.exports=(r=h,d(a({},"__esModule",{value:!0}),r));var p=u(n(6540)),y=u(n(6147)),m=u(n(4744));const f=e=>p.default.lazy((async()=>{const t=await e();return"function"==typeof t.default?t:t.default})),b=/[?&#](?:start|t)=([0-9hms]+)/,g=/[?&#]end=([0-9hms]+)/,v=/(\d+)(h|m|s)/g,w=/^\d+$/;function P(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const e=n[1];if(e.match(v))return function(e){let t=0,n=v.exec(e);for(;null!==n;){const[,r,i]=n;"h"===i&&(t+=60*parseInt(r,10)*60),"m"===i&&(t+=60*parseInt(r,10)),"s"===i&&(t+=parseInt(r,10)),n=v.exec(e)}return t}(e);if(w.test(e))return parseInt(e)}}function j(e){return P(e,b)}function x(e){return P(e,g)}function _(){return Math.random().toString(36).substr(2,5)}function O(e){return Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&")}function k(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const I={},T=function(e){0;return e}((function(e,t,n=null,r=(()=>!0),i=y.default){const a=k(t);return a&&r(a)?Promise.resolve(a):new Promise(((r,a)=>{if(I[e])return void I[e].push({resolve:r,reject:a});I[e]=[{resolve:r,reject:a}];const o=t=>{I[e].forEach((e=>e.resolve(t)))};if(n){const e=window[n];window[n]=function(){e&&e(),o(k(t))}}i(e,(r=>{r?(I[e].forEach((e=>e.reject(r))),I[e]=null):n||o(k(t))}))}))}));function E(e,t){return(0,m.default)(t.config,e.config)}function R(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)-1===n.indexOf(a)&&(r[a]=e[a]);return r}function S(e,...t){if(!this.player||!this.player[e]){let t=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c \u2013 `;return this.player?this.player[e]||(t+="The method was not available"):t+="The player was not available",console.warn(t,"font-weight: bold",""),null}return this.player[e](...t)}function C(e){return"undefined"!=typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream}function M(e){return/^blob:/.test(e)}function A(e=document.createElement("video")){const t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"==typeof e.webkitSetPresentationMode&&t}}}]); \ No newline at end of file diff --git a/assets/js/c1b67de1.8de9dfeb.js b/assets/js/c1b67de1.8de9dfeb.js new file mode 100644 index 0000000..4bfda19 --- /dev/null +++ b/assets/js/c1b67de1.8de9dfeb.js @@ -0,0 +1 @@ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[80],{869:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,cmakelists:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>d,tb_v:()=>h,toc:()=>y});var r=n(4848),i=n(8453),a=n(1432),o=n(3554),s=n.n(o);const l={sidebar_position:1},c="Simulation",d={id:"examples/simulation",title:"Simulation",description:"In the previous section Getting Started, we saw how to download SoCMake inside our project.",source:"@site/docs/examples/simulation.md",sourceDirName:"examples",slug:"/examples/simulation",permalink:"/SoCMake/docs/examples/simulation",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/simulation.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Examples",permalink:"/SoCMake/docs/category/examples"},next:{title:"Hierarchical design",permalink:"/SoCMake/docs/examples/linking_ips"}},u={},h=n(2309).A,p=n(457).A,y=[{value:"tb.v",id:"tbv",level:2},{value:"CMakeLists.txt",id:"cmakeliststxt",level:2},{value:"add_ip()",id:"add_ip",level:3},{value:"ip_sources()",id:"ip_sources",level:3},{value:"iverilog()",id:"iverilog",level:3},{value:"verilator()",id:"verilator",level:3},{value:"Running the example",id:"running-the-example",level:2},{value:"Video example",id:"video-example",level:3},{value:"Instructions",id:"instructions",level:3}];function m(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"simulation",children:"Simulation"}),"\n",(0,r.jsxs)(t.p,{children:["In the previous section ",(0,r.jsx)(t.a,{href:"/SoCMake/docs/getting_started",children:"Getting Started"}),", we saw how to download SoCMake inside our project."]}),"\n",(0,r.jsxs)(t.p,{children:["Let's try to run a simple Verilog testbench now with ",(0,r.jsx)(t.a,{href:"https://github.com/steveicarus/iverilog",children:"Icarus Verilog"})," and/or ",(0,r.jsx)(t.a,{href:"https://github.com/verilator/verilator",children:"Verilator"}),"."]}),"\n",(0,r.jsx)(t.p,{children:"For this step make sure you have Iverilog and/or Verilator installed on your system."}),"\n",(0,r.jsx)(t.p,{children:"Lets create a simple verilog testbench file:"}),"\n","\n","\n",(0,r.jsx)(t.h2,{id:"tbv",children:"tb.v"}),"\n",(0,r.jsx)(t.p,{children:"The following testbench will just print something to the stdout."}),"\n",(0,r.jsx)(a.A,{language:"verilog",title:"tb.v",showLineNumbers:!0,children:h}),"\n",(0,r.jsx)(t.h2,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.code,{children:"CMakeLists.txt"})," will create a library, add sources and create verilator and iverilog Makefile targets."]}),"\n",(0,r.jsx)(a.A,{language:"cmake",title:"CMakeLists.txt",showLineNumbers:!0,children:p}),"\n",(0,r.jsx)(t.h3,{id:"add_ip",children:"add_ip()"}),"\n",(0,r.jsxs)(t.p,{children:["We are creating an ",(0,r.jsx)(t.code,{children:"IP"})," library called ",(0,r.jsx)(t.code,{children:"tb"})," using ",(0,r.jsx)(t.code,{children:"add_ip()"})," function.\nFunction add_ip takes the following arguments:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["First argument is positional ",(0,r.jsx)(t.strong,{children:"NAME"})," of the defined library"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"VENDOR"})," - name of the vendor (your company, organization, ...)"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"LIBRARY"})," - name of the library which the IP is part of"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"VERSION"})," - Version number of the IP"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The library that will be created will hold a name ",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),"__",(0,r.jsx)(t.strong,{children:""}),", there will be also a CMake ",(0,r.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries",children:"alias library"})," that is created with the name ",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"::",(0,r.jsx)(t.strong,{children:""}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["In this a library called ",(0,r.jsx)(t.strong,{children:"cern::ip::tb::0.0.1"})," is created.",(0,r.jsx)("br",{}),"\nThis function also sets ",(0,r.jsx)(t.code,{children:"IP"})," variable in the current scope from where it was called. The IP will hold the non alias full library name."]}),"\n",(0,r.jsx)(t.h3,{id:"ip_sources",children:"ip_sources()"}),"\n",(0,r.jsxs)(t.p,{children:["To add design sources to the ",(0,r.jsx)(t.code,{children:"IP"})," library, we can use ",(0,r.jsx)(t.code,{children:"ip_sources()"})," function.\nThe function takes"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["First argument is positional ",(0,r.jsx)(t.strong,{children:"NAME"})," of the library to add sources to."]}),"\n",(0,r.jsxs)(t.li,{children:["Second argument is positional ",(0,r.jsx)(t.strong,{children:"TYPE"})," and represents the file type to be added."]}),"\n",(0,r.jsxs)(t.li,{children:["Third argument is positional ",(0,r.jsx)(t.strong,{children:"SOURCES"})," and is a list of source files to be added"]}),"\n"]}),"\n",(0,r.jsxs)(t.admonition,{type:"info",children:[(0,r.jsxs)(t.p,{children:["Using just the name of the library ",(0,r.jsx)(t.code,{children:"tb"})," is possible only if the add_ip() call is in the same CMakeLists.txt (subdirectory), and it was the last library added.\nIn other cases you can use:"]}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"${IP}"})," same as ",(0,r.jsx)(t.code,{children:"tb"}),", should be in same subdirectory and last library added"]}),"\n",(0,r.jsxs)(t.li,{children:["Full name ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1"})," (always works, from any subdirectory)"]}),"\n",(0,r.jsxs)(t.li,{children:["Alias libray name ",(0,r.jsx)(t.code,{children:"cern::ip::tb::0.0.1"})," (always works, from any subdirectory)"]}),"\n"]})]}),"\n",(0,r.jsx)(t.h3,{id:"iverilog",children:"iverilog()"}),"\n",(0,r.jsxs)(t.p,{children:["This function will add a target to compile the Icarus Verilog testbench.\nThe name of the created ",(0,r.jsx)(t.code,{children:"Makefile"})," target will be: ",(0,r.jsx)(t.code,{children:"${IP}_iverilog"})," in this case : ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iverilog"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"verilator",children:"verilator()"}),"\n",(0,r.jsxs)(t.p,{children:["This function will add a target to compile the Verilator testbench.\nIn this case because it is a Verilog only testbench, we are passing ",(0,r.jsx)(t.code,{children:"MAIN"})," argument, to let Verilator create a ",(0,r.jsx)(t.code,{children:"main.cpp"})," file for us.",(0,r.jsx)("br",{}),"\nFor a custom C++ testbench checkout the next example."]}),"\n",(0,r.jsxs)(t.p,{children:["The name of the created ",(0,r.jsx)(t.code,{children:"Makefile"})," target will be: ",(0,r.jsx)(t.code,{children:"${IP}_verilate"})," in this case : ",(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilate"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"running-the-example",children:"Running the example"}),"\n",(0,r.jsx)(t.h3,{id:"video-example",children:"Video example"}),"\n",(0,r.jsx)(t.p,{children:"Checkout the video example below to see how to run the simulation."}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:(0,r.jsx)("strong",{children:"Video demonstration"})}),(0,r.jsx)(s(),{width:"100%",height:"100%",controls:!0,url:"/examples/sim_example.mp4"})]}),"\n",(0,r.jsx)(t.h3,{id:"instructions",children:"Instructions"}),"\n",(0,r.jsx)(t.p,{children:"To run the example we need to create a build directory as always:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"mkdir build\ncd build\n"})}),"\n",(0,r.jsx)(t.p,{children:"Then we generate Makefiles with:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cmake ../\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Now we have ",(0,r.jsx)(t.code,{children:"Makefile"})," in the build directory, which contain generated targets.\nThe targets we are interested in are:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iverilog"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilate"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"To run the simulation we can do:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"make cern__ip__tb__0.0.1_iverilog # Compile with Icarus Verilog`\nmake cern__ip__tb__0.0.1_verilate -j$(nproc) # Compile with Verilator`\n"})}),"\n",(0,r.jsxs)(t.p,{children:["We can compile Verilator testbench with maximum threads with ",(0,r.jsx)(t.code,{children:"-j$(nproc)"})," flag."]}),"\n",(0,r.jsxs)(t.p,{children:["Once we execute one or both of these targets we will have the testbenches compiled as executables and available to run as a normal executables.\nThe executables will be present in ",(0,r.jsx)(t.code,{children:"${PROJECT_BINARY_DIR}"})," in this case ",(0,r.jsx)(t.code,{children:"build"})," directory."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_iv"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"cern__ip__tb__0.0.1_verilator_tb"})}),"\n"]})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach((function(t){i[t]=r(e[t],n)})),a(t).forEach((function(a){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(o(e,a)&&n.isMergeableObject(t[a])?i[a]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(a,n)(e[a],t[a],n):i[a]=r(t[a],n))})),i}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=r;var o=Array.isArray(n);return o===Array.isArray(e)?o?a.arrayMerge(e,n,a):s(e,n,a):r(n,a)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},6147:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function n(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,r,i){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof r&&(i=r,r={}),r=r||{},i=i||function(){},o.type=r.type||"text/javascript",o.charset=r.charset||"utf8",o.async=!("async"in r)||!!r.async,o.src=e,r.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(o,r.attrs),r.text&&(o.text=""+r.text),("onload"in o?t:n)(o,i),o.onload||t(o,i),a.appendChild(o)}},1811:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n{"use strict";n.d(t,{A:()=>r});const r='cmake_minimum_required(VERSION 3.25)\nproject(example NONE)\n\ninclude("deps/deps.cmake")\n\nadd_ip(tb # Name of the IP block\n VENDOR cern # Vendor name (can be ommited, but not recommended)\n LIBRARY ip # Library name (can be ommited, but not recommended)\n VERSION 0.0.1 # Version Number (can be ommited, but not recommended)\n )\n\nip_sources(tb VERILOG # Add source files to the VERILOG file set\n ${PROJECT_SOURCE_DIR}/tb.v\n )\n\niverilog(tb) # Create iverilog target\n\nverilate(tb # Create verilate target\n MAIN # Let Verilator create a main.cpp testbench\n )\n'},2309:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r='module tb;\n initial begin\n $display("Simulated with Iverilog, from SoCMake build system\\n");\n $finish();\n end\n endmodule\n'},8021:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),p={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(p,{default:()=>g}),e.exports=(r=p,d(a({},"__esModule",{value:!0}),r));var y=u(n(6540)),m=u(n(115)),f=n(7604),b=n(5635);class g extends y.Component{constructor(){super(...arguments),h(this,"mounted",!1),h(this,"isReady",!1),h(this,"isPlaying",!1),h(this,"isLoading",!0),h(this,"loadOnReady",null),h(this,"startOnPlay",!0),h(this,"seekOnPlay",null),h(this,"onDurationCalled",!1),h(this,"handlePlayerMount",(e=>{this.player||(this.player=e,this.player.load(this.props.url)),this.progress()})),h(this,"getInternalPlayer",(e=>this.player?this.player[e]:null)),h(this,"progress",(()=>{if(this.props.url&&this.player&&this.isReady){const e=this.getCurrentTime()||0,t=this.getSecondsLoaded(),n=this.getDuration();if(n){const r={playedSeconds:e,played:e/n};null!==t&&(r.loadedSeconds=t,r.loaded=t/n),r.playedSeconds===this.prevPlayed&&r.loadedSeconds===this.prevLoaded||this.props.onProgress(r),this.prevPlayed=r.playedSeconds,this.prevLoaded=r.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)})),h(this,"handleReady",(()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:e,playing:t,volume:n,muted:r}=this.props;e(),r||null===n||this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):t&&this.player.play(),this.handleDurationCheck()})),h(this,"handlePlay",(()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:e,onPlay:t,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&1!==n&&this.player.setPlaybackRate(n),e(),this.startOnPlay=!1),t(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()})),h(this,"handlePause",(e=>{this.isPlaying=!1,this.isLoading||this.props.onPause(e)})),h(this,"handleEnded",(()=>{const{activePlayer:e,loop:t,onEnded:n}=this.props;e.loopOnEnded&&t&&this.seekTo(0),t||(this.isPlaying=!1,n())})),h(this,"handleError",((...e)=>{this.isLoading=!1,this.props.onError(...e)})),h(this,"handleDurationCheck",(()=>{clearTimeout(this.durationCheckTimeout);const e=this.getDuration();e?this.onDurationCalled||(this.props.onDuration(e),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)})),h(this,"handleLoaded",(()=>{this.isLoading=!1}))}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(e){if(!this.player)return;const{url:t,playing:n,volume:r,muted:i,playbackRate:a,pip:o,loop:s,activePlayer:l,disableDeferredLoading:c}=this.props;if(!(0,m.default)(e.url,t)){if(this.isLoading&&!l.forceLoad&&!c&&!(0,b.isMediaStream)(t))return console.warn(`ReactPlayer: the attempt to load ${t} is being deferred until the player has loaded`),void(this.loadOnReady=t);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(t,this.isReady)}e.playing||!n||this.isPlaying||this.player.play(),e.playing&&!n&&this.isPlaying&&this.player.pause(),!e.pip&&o&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!o&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==r&&null!==r&&this.player.setVolume(r),e.muted!==i&&(i?this.player.mute():(this.player.unmute(),null!==r&&setTimeout((()=>this.player.setVolume(r))))),e.playbackRate!==a&&this.player.setPlaybackRate&&this.player.setPlaybackRate(a),e.loop!==s&&this.player.setLoop&&this.player.setLoop(s)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(e,t,n){if(!this.isReady)return void(0!==e&&(this.seekOnPlay=e,setTimeout((()=>{this.seekOnPlay=null}),5e3)));if(t?"fraction"===t:e>0&&e<1){const t=this.player.getDuration();return t?void this.player.seekTo(t*e,n):void console.warn("ReactPlayer: could not seek using fraction \u2013\xa0duration not yet available")}this.player.seekTo(e,n)}render(){const e=this.props.activePlayer;return e?y.default.createElement(e,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}h(g,"displayName","Player"),h(g,"propTypes",f.propTypes),h(g,"defaultProps",f.defaultProps)},5580:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),p={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(p,{createReactPlayer:()=>I}),e.exports=(r=p,d(a({},"__esModule",{value:!0}),r));var y=u(n(6540)),m=u(n(4744)),f=u(n(1811)),b=u(n(115)),g=n(7604),v=n(5635),w=u(n(8021));const P=(0,v.lazy)((()=>n.e(353).then(n.t.bind(n,6734,23)))),j="undefined"!=typeof window&&window.document,x=void 0!==n.g&&n.g.window&&n.g.window.document,_=Object.keys(g.propTypes),O=j||x?y.Suspense:()=>null,k=[],I=(e,t)=>{var n;return n=class extends y.Component{constructor(){super(...arguments),h(this,"state",{showPreview:!!this.props.light}),h(this,"references",{wrapper:e=>{this.wrapper=e},player:e=>{this.player=e}}),h(this,"handleClickPreview",(e=>{this.setState({showPreview:!1}),this.props.onClickPreview(e)})),h(this,"showPreview",(()=>{this.setState({showPreview:!0})})),h(this,"getDuration",(()=>this.player?this.player.getDuration():null)),h(this,"getCurrentTime",(()=>this.player?this.player.getCurrentTime():null)),h(this,"getSecondsLoaded",(()=>this.player?this.player.getSecondsLoaded():null)),h(this,"getInternalPlayer",((e="player")=>this.player?this.player.getInternalPlayer(e):null)),h(this,"seekTo",((e,t,n)=>{if(!this.player)return null;this.player.seekTo(e,t,n)})),h(this,"handleReady",(()=>{this.props.onReady(this)})),h(this,"getActivePlayer",(0,f.default)((n=>{for(const t of[...k,...e])if(t.canPlay(n))return t;return t||null}))),h(this,"getConfig",(0,f.default)(((e,t)=>{const{config:n}=this.props;return m.default.all([g.defaultProps.config,g.defaultProps.config[t]||{},n,n[t]||{}])}))),h(this,"getAttributes",(0,f.default)((e=>(0,v.omit)(this.props,_)))),h(this,"renderActivePlayer",(e=>{if(!e)return null;const t=this.getActivePlayer(e);if(!t)return null;const n=this.getConfig(e,t.key);return y.default.createElement(w.default,{...this.props,key:t.key,ref:this.references.player,config:n,activePlayer:t.lazyPlayer||t,onReady:this.handleReady})}))}shouldComponentUpdate(e,t){return!(0,b.default)(this.props,e)||!(0,b.default)(this.state,t)}componentDidUpdate(e){const{light:t}=this.props;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}renderPreview(e){if(!e)return null;const{light:t,playIcon:n,previewTabIndex:r,oEmbedUrl:i}=this.props;return y.default.createElement(P,{url:e,light:t,playIcon:n,previewTabIndex:r,oEmbedUrl:i,onClick:this.handleClickPreview})}render(){const{url:e,style:t,width:n,height:r,fallback:i,wrapper:a}=this.props,{showPreview:o}=this.state,s=this.getAttributes(e),l="string"==typeof a?this.references.wrapper:void 0;return y.default.createElement(a,{ref:l,style:{...t,width:n,height:r},...s},y.default.createElement(O,{fallback:i},o?this.renderPreview(e):this.renderActivePlayer(e)))}},h(n,"displayName","ReactPlayer"),h(n,"propTypes",g.propTypes),h(n,"defaultProps",g.defaultProps),h(n,"addCustomPlayer",(e=>{k.push(e)})),h(n,"removeCustomPlayers",(()=>{k.length=0})),h(n,"canPlay",(t=>{for(const n of[...k,...e])if(n.canPlay(t))return!0;return!1})),h(n,"canEnablePIP",(t=>{for(const n of[...k,...e])if(n.canEnablePIP&&n.canEnablePIP(t))return!0;return!1})),n}},3554:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{default:()=>m}),e.exports=(r=u,d(a({},"__esModule",{value:!0}),r));var h=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(7015)),p=n(5580);const y=h.default[h.default.length-1];var m=(0,p.createReactPlayer)(h.default,y)},327:(e,t,n)=>{var r,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(l,{AUDIO_EXTENSIONS:()=>x,DASH_EXTENSIONS:()=>k,FLV_EXTENSIONS:()=>I,HLS_EXTENSIONS:()=>O,MATCH_URL_DAILYMOTION:()=>v,MATCH_URL_FACEBOOK:()=>p,MATCH_URL_FACEBOOK_WATCH:()=>y,MATCH_URL_KALTURA:()=>j,MATCH_URL_MIXCLOUD:()=>w,MATCH_URL_SOUNDCLOUD:()=>u,MATCH_URL_STREAMABLE:()=>m,MATCH_URL_TWITCH_CHANNEL:()=>g,MATCH_URL_TWITCH_VIDEO:()=>b,MATCH_URL_VIDYARD:()=>P,MATCH_URL_VIMEO:()=>h,MATCH_URL_WISTIA:()=>f,MATCH_URL_YOUTUBE:()=>d,VIDEO_EXTENSIONS:()=>_,canPlay:()=>S}),e.exports=(r=l,((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===n||i(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e})(i({},"__esModule",{value:!0}),r));var c=n(5635);const d=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,u=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,h=/vimeo\.com\/(?!progressive_redirect).+/,p=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,y=/^https?:\/\/fb\.watch\/.+$/,m=/streamable\.com\/([a-z0-9]+)$/,f=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,b=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,g=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,v=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,w=/mixcloud\.com\/([^/]+\/[^/]+)/,P=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,j=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,x=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,_=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,O=/\.(m3u8)($|\?)/i,k=/\.(mpd)($|\?)/i,I=/\.(flv)($|\?)/i,T=e=>{if(e instanceof Array){for(const t of e){if("string"==typeof t&&T(t))return!0;if(T(t.src))return!0}return!1}return!(!(0,c.isMediaStream)(e)&&!(0,c.isBlobUrl)(e))||(x.test(e)||_.test(e)||O.test(e)||k.test(e)||I.test(e))},S={youtube:e=>e instanceof Array?e.every((e=>d.test(e))):d.test(e),soundcloud:e=>u.test(e)&&!x.test(e),vimeo:e=>h.test(e)&&!_.test(e)&&!O.test(e),facebook:e=>p.test(e)||y.test(e),streamable:e=>m.test(e),wistia:e=>f.test(e),twitch:e=>b.test(e)||g.test(e),dailymotion:e=>v.test(e),mixcloud:e=>w.test(e),vidyard:e=>P.test(e),kaltura:e=>j.test(e),file:T}},7015:(e,t,n)=>{Object.create;var r,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),l=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===n||i(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e},c={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(c,{default:()=>h}),e.exports=(r=c,l(i({},"__esModule",{value:!0}),r));var d=n(5635),u=n(327),h=[{key:"youtube",name:"YouTube",canPlay:u.canPlay.youtube,lazyPlayer:(0,d.lazy)((()=>n.e(446).then(n.t.bind(n,2910,23))))},{key:"soundcloud",name:"SoundCloud",canPlay:u.canPlay.soundcloud,lazyPlayer:(0,d.lazy)((()=>n.e(979).then(n.t.bind(n,3127,23))))},{key:"vimeo",name:"Vimeo",canPlay:u.canPlay.vimeo,lazyPlayer:(0,d.lazy)((()=>n.e(173).then(n.t.bind(n,1423,23))))},{key:"facebook",name:"Facebook",canPlay:u.canPlay.facebook,lazyPlayer:(0,d.lazy)((()=>n.e(887).then(n.t.bind(n,1343,23))))},{key:"streamable",name:"Streamable",canPlay:u.canPlay.streamable,lazyPlayer:(0,d.lazy)((()=>n.e(627).then(n.t.bind(n,9643,23))))},{key:"wistia",name:"Wistia",canPlay:u.canPlay.wistia,lazyPlayer:(0,d.lazy)((()=>n.e(340).then(n.t.bind(n,3330,23))))},{key:"twitch",name:"Twitch",canPlay:u.canPlay.twitch,lazyPlayer:(0,d.lazy)((()=>n.e(42).then(n.t.bind(n,1400,23))))},{key:"dailymotion",name:"DailyMotion",canPlay:u.canPlay.dailymotion,lazyPlayer:(0,d.lazy)((()=>n.e(328).then(n.t.bind(n,9348,23))))},{key:"mixcloud",name:"Mixcloud",canPlay:u.canPlay.mixcloud,lazyPlayer:(0,d.lazy)((()=>n.e(570).then(n.t.bind(n,3276,23))))},{key:"vidyard",name:"Vidyard",canPlay:u.canPlay.vidyard,lazyPlayer:(0,d.lazy)((()=>n.e(392).then(n.t.bind(n,3552,23))))},{key:"kaltura",name:"Kaltura",canPlay:u.canPlay.kaltura,lazyPlayer:(0,d.lazy)((()=>n.e(463).then(n.t.bind(n,7945,23))))},{key:"file",name:"FilePlayer",canPlay:u.canPlay.file,canEnablePIP:e=>u.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,d.supportsWebKitPresentationMode)())&&!u.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,d.lazy)((()=>n.e(458).then(n.t.bind(n,688,23))))}]},7604:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{defaultProps:()=>_,propTypes:()=>j}),e.exports=(r=u,d(a({},"__esModule",{value:!0}),r));var h=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(5556));const{string:p,bool:y,number:m,array:f,oneOfType:b,shape:g,object:v,func:w,node:P}=h.default,j={url:b([p,f,v]),playing:y,loop:y,controls:y,volume:m,muted:y,playbackRate:m,width:b([p,m]),height:b([p,m]),style:v,progressInterval:m,playsinline:y,pip:y,stopOnUnmount:y,light:b([y,p,v]),playIcon:P,previewTabIndex:m,fallback:P,oEmbedUrl:p,wrapper:b([p,w,g({render:w.isRequired})]),config:g({soundcloud:g({options:v}),youtube:g({playerVars:v,embedOptions:v,onUnstarted:w}),facebook:g({appId:p,version:p,playerId:p,attributes:v}),dailymotion:g({params:v}),vimeo:g({playerOptions:v,title:p}),file:g({attributes:v,tracks:f,forceVideo:y,forceAudio:y,forceHLS:y,forceSafariHLS:y,forceDisableHls:y,forceDASH:y,forceFLV:y,hlsOptions:v,hlsVersion:p,dashVersion:p,flvVersion:p}),wistia:g({options:v,playerId:p,customControls:f}),mixcloud:g({options:v}),twitch:g({options:v,playerId:p}),vidyard:g({options:v})}),onReady:w,onStart:w,onPlay:w,onPause:w,onBuffer:w,onBufferEnd:w,onEnded:w,onError:w,onDuration:w,onSeek:w,onPlaybackRateChange:w,onPlaybackQualityChange:w,onProgress:w,onClickPreview:w,onEnablePIP:w,onDisablePIP:w},x=()=>{},_={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:x},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:x,onStart:x,onPlay:x,onPause:x,onBuffer:x,onBufferEnd:x,onEnded:x,onError:x,onDuration:x,onSeek:x,onPlaybackRateChange:x,onPlaybackQualityChange:x,onProgress:x,onClickPreview:x,onEnablePIP:x,onDisablePIP:x}},5635:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),h={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(h,{callPlayer:()=>R,getConfig:()=>S,getSDK:()=>T,isBlobUrl:()=>M,isMediaStream:()=>C,lazy:()=>f,omit:()=>E,parseEndTime:()=>x,parseStartTime:()=>j,queryString:()=>O,randomString:()=>_,supportsWebKitPresentationMode:()=>A}),e.exports=(r=h,d(a({},"__esModule",{value:!0}),r));var p=u(n(6540)),y=u(n(6147)),m=u(n(4744));const f=e=>p.default.lazy((async()=>{const t=await e();return"function"==typeof t.default?t:t.default})),b=/[?&#](?:start|t)=([0-9hms]+)/,g=/[?&#]end=([0-9hms]+)/,v=/(\d+)(h|m|s)/g,w=/^\d+$/;function P(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const e=n[1];if(e.match(v))return function(e){let t=0,n=v.exec(e);for(;null!==n;){const[,r,i]=n;"h"===i&&(t+=60*parseInt(r,10)*60),"m"===i&&(t+=60*parseInt(r,10)),"s"===i&&(t+=parseInt(r,10)),n=v.exec(e)}return t}(e);if(w.test(e))return parseInt(e)}}function j(e){return P(e,b)}function x(e){return P(e,g)}function _(){return Math.random().toString(36).substr(2,5)}function O(e){return Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&")}function k(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const I={},T=function(e){0;return e}((function(e,t,n=null,r=(()=>!0),i=y.default){const a=k(t);return a&&r(a)?Promise.resolve(a):new Promise(((r,a)=>{if(I[e])return void I[e].push({resolve:r,reject:a});I[e]=[{resolve:r,reject:a}];const o=t=>{I[e].forEach((e=>e.resolve(t)))};if(n){const e=window[n];window[n]=function(){e&&e(),o(k(t))}}i(e,(r=>{r?(I[e].forEach((e=>e.reject(r))),I[e]=null):n||o(k(t))}))}))}));function S(e,t){return(0,m.default)(t.config,e.config)}function E(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)-1===n.indexOf(a)&&(r[a]=e[a]);return r}function R(e,...t){if(!this.player||!this.player[e]){let t=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c \u2013 `;return this.player?this.player[e]||(t+="The method was not available"):t+="The player was not available",console.warn(t,"font-weight: bold",""),null}return this.player[e](...t)}function C(e){return"undefined"!=typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream}function M(e){return/^blob:/.test(e)}function A(e=document.createElement("video")){const t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"==typeof e.webkitSetPresentationMode&&t}}}]); \ No newline at end of file diff --git a/assets/js/cf98907a.340f7992.js b/assets/js/cf98907a.340f7992.js new file mode 100644 index 0000000..cdc6d8d --- /dev/null +++ b/assets/js/cf98907a.340f7992.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[688],{2385:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>d});var o=n(4848),i=n(8453);const a={sidebar_position:2},s="API documentation",r={id:"api_documentation",title:"API documentation",description:"SoCMake API documentation.",source:"@site/docs/api_documentation.mdx",sourceDirName:".",slug:"/api_documentation",permalink:"/SoCMake/docs/api_documentation",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/api_documentation.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Introduction",permalink:"/SoCMake/docs/intro"},next:{title:"Getting Started",permalink:"/SoCMake/docs/getting_started"}},c={},d=[];function u(t){const e={a:"a",h1:"h1",p:"p",...(0,i.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h1,{id:"api-documentation",children:"API documentation"}),"\n",(0,o.jsxs)(e.p,{children:["SoCMake API ",(0,o.jsx)(e.a,{href:"pathname:///api_html/index.html",children:"documentation"}),"."]})]})}function p(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>s,x:()=>r});var o=n(6540);const i={},a=o.createContext(i);function s(t){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:s(t.components),o.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/cf98907a.98ca7d3c.js b/assets/js/cf98907a.98ca7d3c.js deleted file mode 100644 index eee6c8b..0000000 --- a/assets/js/cf98907a.98ca7d3c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[688],{2385:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>d});var o=n(4848),i=n(8453);const a={sidebar_position:2},s="API documentation",r={id:"api_documentation",title:"API documentation",description:"SoCMake API documentation.",source:"@site/docs/api_documentation.mdx",sourceDirName:".",slug:"/api_documentation",permalink:"/docs/api_documentation",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/api_documentation.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Introduction",permalink:"/docs/intro"},next:{title:"Getting Started",permalink:"/docs/getting_started"}},c={},d=[];function u(t){const e={a:"a",h1:"h1",p:"p",...(0,i.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h1,{id:"api-documentation",children:"API documentation"}),"\n",(0,o.jsxs)(e.p,{children:["SoCMake API ",(0,o.jsx)(e.a,{href:"pathname:///api_html/index.html",children:"documentation"}),"."]})]})}function p(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>s,x:()=>r});var o=n(6540);const i={},a=o.createContext(i);function s(t){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:s(t.components),o.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc8c471e.262b45ea.js b/assets/js/dc8c471e.262b45ea.js new file mode 100644 index 0000000..0f7c304 --- /dev/null +++ b/assets/js/dc8c471e.262b45ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[574],{1784:(e,t,n)=>{n.r(t),n.d(t,{adder_cmakelists:()=>p,adder_v:()=>o,assets:()=>c,cmakelists:()=>h,contentTitle:()=>d,default:()=>j,frontMatter:()=>s,main_cpp:()=>u,metadata:()=>l,toc:()=>m});var i=n(4848),a=n(8453),r=n(1432);const s={sidebar_position:3},d="Verilator C++ testbench",l={id:"examples/verilator",title:"Verilator C++ testbench",description:"Description",source:"@site/docs/examples/verilator.mdx",sourceDirName:"examples",slug:"/examples/verilator",permalink:"/SoCMake/docs/examples/verilator",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/verilator.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Hierarchical design",permalink:"/SoCMake/docs/examples/linking_ips"}},c={},o=n(4774).A,h=n(5119).A,p=n(464).A,u=n(9995).A,m=[{value:"Description",id:"description",level:3},{value:"Example",id:"example",level:2},{value:"Directory structure",id:"directory-structure",level:3},{value:"adder/adder.v",id:"adderadderv",level:3},{value:"adder/CMakeLists.txt",id:"addercmakeliststxt",level:3},{value:"main.cpp",id:"maincpp",level:3},{value:"CMakeLists.txt",id:"cmakeliststxt",level:3},{value:"Build graph",id:"build-graph",level:3},{value:"Running the simulation",id:"running-the-simulation",level:2}];function x(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"verilator-c-testbench",children:"Verilator C++ testbench"}),"\n","\n","\n",(0,i.jsx)(t.h3,{id:"description",children:"Description"}),"\n",(0,i.jsx)(t.p,{children:"This example shows how to create a C++ testbench and instantiate a Verilated RTL IP library."}),"\n",(0,i.jsxs)(t.p,{children:["In this case we will have an IP library called ",(0,i.jsx)(t.code,{children:"adder"}),", that is just a simple combinatorial adder with only 1 file ",(0,i.jsx)(t.code,{children:"adder.v"}),".",(0,i.jsx)("br",{}),"\nWe will also have a C++ testbench ",(0,i.jsx)(t.code,{children:"main.cpp"})]}),"\n",(0,i.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,i.jsx)(t.h3,{id:"directory-structure",children:"Directory structure"}),"\n",(0,i.jsx)(t.p,{children:"Lets take a look at the directory structure of the example first."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-raw",children:".\n\u251c\u2500\u2500 adder\n\u2502\xa0\xa0 \u251c\u2500\u2500 adder.v\n\u2502\xa0\xa0 \u2514\u2500\u2500 CMakeLists.txt\n\u251c\u2500\u2500 CMakeLists.txt\n\u251c\u2500\u2500 deps\n\u2502\xa0\xa0 \u251c\u2500\u2500 CPM.cmake\n\u2502\xa0\xa0 \u2514\u2500\u2500 deps.cmake\n\u2514\u2500\u2500 main.cpp\n"})}),"\n",(0,i.jsxs)(t.p,{children:["We have a directory ",(0,i.jsx)(t.code,{children:"adder/"})," that contains the ",(0,i.jsx)(t.code,{children:"adder"})," IP block, it as its own ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"})," to make it easier to reuse in a larger project."]}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["For a design this simple it is not really necessary to have a separate ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"}),", but it is a good practice anyways."]})}),"\n",(0,i.jsx)(t.h3,{id:"adderadderv",children:"adder/adder.v"}),"\n",(0,i.jsx)(t.p,{children:"Adder verilog file is just a simple two 8bit inputs, and a 9bit output module."}),"\n",(0,i.jsx)(r.A,{language:"verilog",title:"adder/adder.v",showLineNumbers:!0,children:o}),"\n",(0,i.jsx)(t.h3,{id:"addercmakeliststxt",children:"adder/CMakeLists.txt"}),"\n",(0,i.jsxs)(t.p,{children:["There is nothing new in this file from previous examples.\nWe are making a library under the full name ",(0,i.jsx)(t.code,{children:"cern::ip::adder::0.0.1"}),"."]}),"\n",(0,i.jsx)(r.A,{language:"cmake",title:"adder/CMakeLists.txt",showLineNumbers:!0,children:p}),"\n",(0,i.jsx)(t.h3,{id:"maincpp",children:"main.cpp"}),"\n",(0,i.jsx)(t.p,{children:"This is a standard C++ testbench using a Verilated model. Refer to Verilator documentation for more information."}),"\n",(0,i.jsx)(r.A,{language:"cpp",title:"main.cpp",showLineNumbers:!0,children:u}),"\n",(0,i.jsx)(t.h3,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,i.jsxs)(t.p,{children:["And finally we need a top ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"})," that will assemble the full design and create simulation targets."]}),"\n",(0,i.jsx)(r.A,{language:"cmake",title:"CMakeLists.txt",showLineNumbers:!0,children:h}),"\n",(0,i.jsxs)(t.p,{children:["We can add the ",(0,i.jsx)(t.code,{children:"adder"})," IP as a subdirectory with ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_subdirectory.html",children:(0,i.jsx)(t.code,{children:"add_subdirectory()"})})," CMake function."]}),"\n",(0,i.jsxs)(t.p,{children:["Then we are creating the target to Verilate the IP.\nExecuting the ",(0,i.jsx)(t.code,{children:"cern__ip__adder__0.0.1_verilate"})," target will compile a ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Static_library",children:"static library"})," of the IP block.",(0,i.jsx)("br",{}),"\nThis time we are not asking Verilator to create a ",(0,i.jsx)(t.code,{children:"main.cpp"})," file as we will write it ourselves.",(0,i.jsx)("br",{}),"\nWe are also passing ",(0,i.jsx)(t.code,{children:"TRACE"})," argument to ",(0,i.jsx)(t.code,{children:"verilate()"}),", indicating that we want to enable ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Value_change_dump",children:(0,i.jsx)(t.code,{children:"VCD"})})," generation in Verilated model."]}),"\n",(0,i.jsxs)(t.p,{children:["After that we create an ",(0,i.jsx)(t.code,{children:"executable"})," with ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_executable.html",children:(0,i.jsx)(t.code,{children:"add_executable()"})})," CMake function. The first argument is the name of the compiled executable, and then we pass a list of sources, in this case only ",(0,i.jsx)(t.code,{children:"main.cpp"})]}),"\n",(0,i.jsxs)(t.p,{children:["Finally we use ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/target_link_libraries.html",children:(0,i.jsx)(t.code,{children:"target_link_libraries()"})}),", to link the Verilated static library into our testbench executable, and also add the include paths for headers of the Verilated model, and Verilator headers."]}),"\n",(0,i.jsxs)(t.admonition,{type:"tip",children:[(0,i.jsxs)(t.p,{children:["Notice in the line 11, we are linking to the static library created with Verilator.\nIt is a bit annoying to have to change the version number manually, in order to avoid it it is a better idea to set a variable in ",(0,i.jsx)(t.code,{children:"adder/CMakeLists.txt"})," that will hold the full name of the IP."]}),(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-cmake",metastring:'title="adder/CMakeLists.txt"',children:"...\nif(NOT PROJECT_IS_TOP_LEVEL) # Avoid warning if project is top level\n set(ADDER_LIB_NAME ${IP} PARENT_SCOPE)\nendif()\n"})}),(0,i.jsxs)(t.p,{children:["And then in ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"}),":"]}),(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-cmake",metastring:'title="CMakeLists.txt"',children:"...\ntarget_link_libraries(testbench ${ADDER_LIB_NAME}__vlt)\n"})})]}),"\n",(0,i.jsx)(t.h3,{id:"build-graph",children:"Build graph"}),"\n",(0,i.jsxs)(t.p,{children:["Take a look at the build graph for this example.\nWe can see that the ",(0,i.jsx)(t.code,{children:"testbench"})," executable depends on Verilated models and Verilator targets.\nExecuting the ",(0,i.jsx)(t.code,{children:"testbench"})," targets, the dependencies will be built first."]}),"\n",(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)("img",{src:n(984).A,alt:"graph"})}),"\n",(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)("img",{src:n(917).A,alt:"graph",width:"80%"})}),"\n",(0,i.jsx)(t.h2,{id:"running-the-simulation",children:"Running the simulation"}),"\n",(0,i.jsx)(t.p,{children:"Simulation can be run the same way as always:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:"mkdir build\ncd build\ncmake ../ # Configure project\nmake testbench -j$(nproc) # Build testbench\n./testbench # Execute testbench\n"})}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["Use ",(0,i.jsx)(t.a,{href:"https://github.com/scop/bash-completion",children:"bash-completion"})," to autocomplete ",(0,i.jsx)(t.code,{children:"make"})," target names.\nAfter typing ",(0,i.jsx)(t.code,{children:"make "})," press ",(0,i.jsx)(t.code,{children:"Tab \u21b9"})," twice."]})})]})}function j(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}},5119:(e,t,n)=>{n.d(t,{A:()=>i});const i='cmake_minimum_required(VERSION 3.25)\nproject(example CXX C)\n\ninclude("deps/deps.cmake")\nadd_subdirectory(adder)\n\nverilate(cern::ip::adder::0.0.1 TRACE)\n\nadd_executable(testbench main.cpp)\n\ntarget_link_libraries(testbench cern::ip::adder::0.0.1::vlt)\n'},464:(e,t,n)=>{n.d(t,{A:()=>i});const i="cmake_minimum_required(VERSION 3.25)\nproject(adder NONE)\n\nadd_ip(adder\n VENDOR cern\n LIBRARY ip\n VERSION 0.0.1\n )\n\nip_sources(adder VERILOG\n ${PROJECT_SOURCE_DIR}/adder.v\n )\n"},4774:(e,t,n)=>{n.d(t,{A:()=>i});const i="module adder (\n input [7:0] a,\n input [7:0] b,\n output [8:0] o\n);\n\n assign o = a + b;\n endmodule\n"},9995:(e,t,n)=>{n.d(t,{A:()=>i});const i='#include \n#include \n#include \n#include \n#include "Vadder.h"\n\nint main (int argc, char *argv[]) {\n Verilated::traceEverOn(true);\n\n Vadder dut;\n\n VerilatedVcdC* m_trace;\n m_trace = new VerilatedVcdC;\n dut.trace(m_trace, 99);\n m_trace->open("trace.vcd");\n\n dut.eval();\n\n for(int i =0; i<30; i++){\n dut.a = i;\n dut.b = i+10;\n\n dut.eval();\n m_trace->dump(10 * i + 10/2);\n\n std::cout << (uint32_t)dut.a <<\n " + " << (uint32_t)dut.b <<\n " = " << (uint32_t)dut.o << "\\n";\n\n if(dut.o != 2*i+10){\n std::cerr << "Mismatch\\n DUT: " << dut.o << "\\n REF: " << 2*i+10 << "\\n";\n std::exit(EXIT_FAILURE);\n }\n }\n\n m_trace->close();\n \n return 0;\n}\n'},984:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/graph-70f9ee9e0efc08a226d3423c36a07b75.png"},917:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/legend-35932698e07f13c8a28e80293d6013d2.png"}}]); \ No newline at end of file diff --git a/assets/js/dc8c471e.f9cb0439.js b/assets/js/dc8c471e.f9cb0439.js deleted file mode 100644 index ace5793..0000000 --- a/assets/js/dc8c471e.f9cb0439.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[574],{1784:(e,t,n)=>{n.r(t),n.d(t,{adder_cmakelists:()=>p,adder_v:()=>o,assets:()=>c,cmakelists:()=>h,contentTitle:()=>d,default:()=>j,frontMatter:()=>s,main_cpp:()=>u,metadata:()=>l,toc:()=>m});var i=n(4848),a=n(8453),r=n(1432);const s={sidebar_position:3},d="Verilator C++ testbench",l={id:"examples/verilator",title:"Verilator C++ testbench",description:"Description",source:"@site/docs/examples/verilator.mdx",sourceDirName:"examples",slug:"/examples/verilator",permalink:"/docs/examples/verilator",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/examples/verilator.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Hierarchical design",permalink:"/docs/examples/linking_ips"}},c={},o=n(4774).A,h=n(5119).A,p=n(464).A,u=n(9995).A,m=[{value:"Description",id:"description",level:3},{value:"Example",id:"example",level:2},{value:"Directory structure",id:"directory-structure",level:3},{value:"adder/adder.v",id:"adderadderv",level:3},{value:"adder/CMakeLists.txt",id:"addercmakeliststxt",level:3},{value:"main.cpp",id:"maincpp",level:3},{value:"CMakeLists.txt",id:"cmakeliststxt",level:3},{value:"Build graph",id:"build-graph",level:3},{value:"Running the simulation",id:"running-the-simulation",level:2}];function x(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"verilator-c-testbench",children:"Verilator C++ testbench"}),"\n","\n","\n",(0,i.jsx)(t.h3,{id:"description",children:"Description"}),"\n",(0,i.jsx)(t.p,{children:"This example shows how to create a C++ testbench and instantiate a Verilated RTL IP library."}),"\n",(0,i.jsxs)(t.p,{children:["In this case we will have an IP library called ",(0,i.jsx)(t.code,{children:"adder"}),", that is just a simple combinatorial adder with only 1 file ",(0,i.jsx)(t.code,{children:"adder.v"}),".",(0,i.jsx)("br",{}),"\nWe will also have a C++ testbench ",(0,i.jsx)(t.code,{children:"main.cpp"})]}),"\n",(0,i.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,i.jsx)(t.h3,{id:"directory-structure",children:"Directory structure"}),"\n",(0,i.jsx)(t.p,{children:"Lets take a look at the directory structure of the example first."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-raw",children:".\n\u251c\u2500\u2500 adder\n\u2502\xa0\xa0 \u251c\u2500\u2500 adder.v\n\u2502\xa0\xa0 \u2514\u2500\u2500 CMakeLists.txt\n\u251c\u2500\u2500 CMakeLists.txt\n\u251c\u2500\u2500 deps\n\u2502\xa0\xa0 \u251c\u2500\u2500 CPM.cmake\n\u2502\xa0\xa0 \u2514\u2500\u2500 deps.cmake\n\u2514\u2500\u2500 main.cpp\n"})}),"\n",(0,i.jsxs)(t.p,{children:["We have a directory ",(0,i.jsx)(t.code,{children:"adder/"})," that contains the ",(0,i.jsx)(t.code,{children:"adder"})," IP block, it as its own ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"})," to make it easier to reuse in a larger project."]}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["For a design this simple it is not really necessary to have a separate ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"}),", but it is a good practice anyways."]})}),"\n",(0,i.jsx)(t.h3,{id:"adderadderv",children:"adder/adder.v"}),"\n",(0,i.jsx)(t.p,{children:"Adder verilog file is just a simple two 8bit inputs, and a 9bit output module."}),"\n",(0,i.jsx)(r.A,{language:"verilog",title:"adder/adder.v",showLineNumbers:!0,children:o}),"\n",(0,i.jsx)(t.h3,{id:"addercmakeliststxt",children:"adder/CMakeLists.txt"}),"\n",(0,i.jsxs)(t.p,{children:["There is nothing new in this file from previous examples.\nWe are making a library under the full name ",(0,i.jsx)(t.code,{children:"cern::ip::adder::0.0.1"}),"."]}),"\n",(0,i.jsx)(r.A,{language:"cmake",title:"adder/CMakeLists.txt",showLineNumbers:!0,children:p}),"\n",(0,i.jsx)(t.h3,{id:"maincpp",children:"main.cpp"}),"\n",(0,i.jsx)(t.p,{children:"This is a standard C++ testbench using a Verilated model. Refer to Verilator documentation for more information."}),"\n",(0,i.jsx)(r.A,{language:"cpp",title:"main.cpp",showLineNumbers:!0,children:u}),"\n",(0,i.jsx)(t.h3,{id:"cmakeliststxt",children:"CMakeLists.txt"}),"\n",(0,i.jsxs)(t.p,{children:["And finally we need a top ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"})," that will assemble the full design and create simulation targets."]}),"\n",(0,i.jsx)(r.A,{language:"cmake",title:"CMakeLists.txt",showLineNumbers:!0,children:h}),"\n",(0,i.jsxs)(t.p,{children:["We can add the ",(0,i.jsx)(t.code,{children:"adder"})," IP as a subdirectory with ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_subdirectory.html",children:(0,i.jsx)(t.code,{children:"add_subdirectory()"})})," CMake function."]}),"\n",(0,i.jsxs)(t.p,{children:["Then we are creating the target to Verilate the IP.\nExecuting the ",(0,i.jsx)(t.code,{children:"cern__ip__adder__0.0.1_verilate"})," target will compile a ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Static_library",children:"static library"})," of the IP block.",(0,i.jsx)("br",{}),"\nThis time we are not asking Verilator to create a ",(0,i.jsx)(t.code,{children:"main.cpp"})," file as we will write it ourselves.",(0,i.jsx)("br",{}),"\nWe are also passing ",(0,i.jsx)(t.code,{children:"TRACE"})," argument to ",(0,i.jsx)(t.code,{children:"verilate()"}),", indicating that we want to enable ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Value_change_dump",children:(0,i.jsx)(t.code,{children:"VCD"})})," generation in Verilated model."]}),"\n",(0,i.jsxs)(t.p,{children:["After that we create an ",(0,i.jsx)(t.code,{children:"executable"})," with ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/add_executable.html",children:(0,i.jsx)(t.code,{children:"add_executable()"})})," CMake function. The first argument is the name of the compiled executable, and then we pass a list of sources, in this case only ",(0,i.jsx)(t.code,{children:"main.cpp"})]}),"\n",(0,i.jsxs)(t.p,{children:["Finally we use ",(0,i.jsx)(t.a,{href:"https://cmake.org/cmake/help/latest/command/target_link_libraries.html",children:(0,i.jsx)(t.code,{children:"target_link_libraries()"})}),", to link the Verilated static library into our testbench executable, and also add the include paths for headers of the Verilated model, and Verilator headers."]}),"\n",(0,i.jsxs)(t.admonition,{type:"tip",children:[(0,i.jsxs)(t.p,{children:["Notice in the line 11, we are linking to the static library created with Verilator.\nIt is a bit annoying to have to change the version number manually, in order to avoid it it is a better idea to set a variable in ",(0,i.jsx)(t.code,{children:"adder/CMakeLists.txt"})," that will hold the full name of the IP."]}),(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-cmake",metastring:'title="adder/CMakeLists.txt"',children:"...\nif(NOT PROJECT_IS_TOP_LEVEL) # Avoid warning if project is top level\n set(ADDER_LIB_NAME ${IP} PARENT_SCOPE)\nendif()\n"})}),(0,i.jsxs)(t.p,{children:["And then in ",(0,i.jsx)(t.code,{children:"CMakeLists.txt"}),":"]}),(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-cmake",metastring:'title="CMakeLists.txt"',children:"...\ntarget_link_libraries(testbench ${ADDER_LIB_NAME}__vlt)\n"})})]}),"\n",(0,i.jsx)(t.h3,{id:"build-graph",children:"Build graph"}),"\n",(0,i.jsxs)(t.p,{children:["Take a look at the build graph for this example.\nWe can see that the ",(0,i.jsx)(t.code,{children:"testbench"})," executable depends on Verilated models and Verilator targets.\nExecuting the ",(0,i.jsx)(t.code,{children:"testbench"})," targets, the dependencies will be built first."]}),"\n",(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)("img",{src:n(984).A,alt:"graph"})}),"\n",(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)("img",{src:n(917).A,alt:"graph",width:"80%"})}),"\n",(0,i.jsx)(t.h2,{id:"running-the-simulation",children:"Running the simulation"}),"\n",(0,i.jsx)(t.p,{children:"Simulation can be run the same way as always:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:"mkdir build\ncd build\ncmake ../ # Configure project\nmake testbench -j$(nproc) # Build testbench\n./testbench # Execute testbench\n"})}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["Use ",(0,i.jsx)(t.a,{href:"https://github.com/scop/bash-completion",children:"bash-completion"})," to autocomplete ",(0,i.jsx)(t.code,{children:"make"})," target names.\nAfter typing ",(0,i.jsx)(t.code,{children:"make "})," press ",(0,i.jsx)(t.code,{children:"Tab \u21b9"})," twice."]})})]})}function j(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}},5119:(e,t,n)=>{n.d(t,{A:()=>i});const i='cmake_minimum_required(VERSION 3.25)\nproject(example CXX C)\n\ninclude("deps/deps.cmake")\nadd_subdirectory(adder)\n\nverilate(cern::ip::adder::0.0.1 TRACE)\n\nadd_executable(testbench main.cpp)\n\ntarget_link_libraries(testbench cern::ip::adder::0.0.1::vlt)\n'},464:(e,t,n)=>{n.d(t,{A:()=>i});const i="cmake_minimum_required(VERSION 3.25)\nproject(adder NONE)\n\nadd_ip(adder\n VENDOR cern\n LIBRARY ip\n VERSION 0.0.1\n )\n\nip_sources(adder VERILOG\n ${PROJECT_SOURCE_DIR}/adder.v\n )\n"},4774:(e,t,n)=>{n.d(t,{A:()=>i});const i="module adder (\n input [7:0] a,\n input [7:0] b,\n output [8:0] o\n);\n\n assign o = a + b;\n endmodule\n"},9995:(e,t,n)=>{n.d(t,{A:()=>i});const i='#include \n#include \n#include \n#include \n#include "Vadder.h"\n\nint main (int argc, char *argv[]) {\n Verilated::traceEverOn(true);\n\n Vadder dut;\n\n VerilatedVcdC* m_trace;\n m_trace = new VerilatedVcdC;\n dut.trace(m_trace, 99);\n m_trace->open("trace.vcd");\n\n dut.eval();\n\n for(int i =0; i<30; i++){\n dut.a = i;\n dut.b = i+10;\n\n dut.eval();\n m_trace->dump(10 * i + 10/2);\n\n std::cout << (uint32_t)dut.a <<\n " + " << (uint32_t)dut.b <<\n " = " << (uint32_t)dut.o << "\\n";\n\n if(dut.o != 2*i+10){\n std::cerr << "Mismatch\\n DUT: " << dut.o << "\\n REF: " << 2*i+10 << "\\n";\n std::exit(EXIT_FAILURE);\n }\n }\n\n m_trace->close();\n \n return 0;\n}\n'},984:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/graph-70f9ee9e0efc08a226d3423c36a07b75.png"},917:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/legend-35932698e07f13c8a28e80293d6013d2.png"}}]); \ No newline at end of file diff --git a/assets/js/ef3c401e.7c294cd1.js b/assets/js/ef3c401e.7c294cd1.js new file mode 100644 index 0000000..7a4bce3 --- /dev/null +++ b/assets/js/ef3c401e.7c294cd1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[274],{1151:e=>{e.exports=JSON.parse('{"title":"Build System","description":"Simple examples on how to use SoCMake for different tasks","slug":"/category/build-system","permalink":"/SoCMake/docs/category/build-system","navigation":{"previous":{"title":"Getting Started","permalink":"/SoCMake/docs/getting_started"},"next":{"title":"Introduction","permalink":"/SoCMake/docs/build_system/intro"}}}')}}]); \ No newline at end of file diff --git a/assets/js/ff07f179.1273d7d4.js b/assets/js/ff07f179.1273d7d4.js deleted file mode 100644 index 754292c..0000000 --- a/assets/js/ff07f179.1273d7d4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[515],{2692:(e,i,a)=>{"use strict";a.r(i),a.d(i,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,graph:()=>c,metadata:()=>l,toc:()=>h});var t=a(4848),s=a(8453),n=a(4782);const o={sidebar_position:3},r="Introduction",l={id:"build_system/intro",title:"Introduction",description:"SoCMake is built on top of CMake.",source:"@site/docs/build_system/intro.mdx",sourceDirName:"build_system",slug:"/build_system/intro",permalink:"/docs/build_system/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/build_system/intro.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Build System",permalink:"/docs/category/build-system"},next:{title:"Examples",permalink:"/docs/category/examples"}},d={},c=a(3443).A,h=[{value:"CMake",id:"cmake",level:2},{value:"CMake Useful links",id:"cmake-useful-links",level:3},{value:"Modern CMake",id:"modern-cmake",level:3},{value:"SoCMake",id:"socmake",level:2},{value:"SoCMake IP libraries",id:"socmake-ip-libraries",level:3},{value:"SoCMake linking IPs example",id:"socmake-linking-ips-example",level:3}];function m(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.h1,{id:"introduction",children:"Introduction"}),"\n",(0,t.jsxs)(i.p,{children:["SoCMake is built on top of ",(0,t.jsx)(i.a,{href:"https://cmake.org/documentation/",children:"CMake"}),"."]}),"\n",(0,t.jsx)(i.h2,{id:"cmake",children:"CMake"}),"\n",(0,t.jsx)(i.p,{children:'CMake stands for "Cross-Platform Make" and is a build system generator.\nBeing a build system generator CMake is not building the software on its own, but instead it generates Make/Ninja files that are used for the real compilation.'}),"\n",(0,t.jsx)(i.p,{children:"CMake build descriptions are described in a declarative CMake domain-specific language (DSL).\nAlthough the CMake language has a lot of issues, it is still a very powerful tool, and the biggest advantage is its maturity and widespread usage.\nAlthough C++ does not have a standard build system, CMake is surely the closest to being one."}),"\n",(0,t.jsx)(i.h3,{id:"cmake-useful-links",children:"CMake Useful links"}),"\n",(0,t.jsx)(i.p,{children:"There is plenty of CMake tutorials online and the documentation is decent, some useful links:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cmake.org/documentation/",children:"Documentation"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/guide/tutorial/index.html",children:"Official Tutorial"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/",children:"It's Time To Do CMake Right"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://www.youtube.com/watch?v=HPMvU64RUTY",children:"Jason Turner Intro Video"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cliutils.gitlab.io/modern-cmake/",children:"Modern CMake"})}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"modern-cmake",children:"Modern CMake"}),"\n",(0,t.jsx)(i.p,{children:"CMake has a bad reputation for it's DSL, which could do things much better.\nIn CMake DSL every variable is a string, which can be pretty awkward and error prone at times.\nSetting aside those problems, it is still a very good build tool, and it provides a lot of flexibility compared to other available build systems."}),"\n",(0,t.jsx)(i.p,{children:"There is a big distinction between earlier versions of CMake and what is recommended today.\nThere are plenty of bad examples online of CMake code, typically coming from older CMake versions that one should avoid."}),"\n",(0,t.jsx)(i.p,{children:"Modern CMake is all about creating targets instead of global variables, and this fits really well into hardware IP hierarchy as it will be explained later.\nThis page will not give a tutorial to CMake as it is already done really well in previously linked tutorials."}),"\n",(0,t.jsx)(i.h2,{id:"socmake",children:"SoCMake"}),"\n",(0,t.jsx)(i.p,{children:"SoCMake is a set of functions for creating hardware IP blocks, composing them, packaging them and executing EDA tools on them."}),"\n",(0,t.jsxs)(i.p,{children:["The advantage to build systems like FuseSoC or hdlmake is that there is a native C++ compilation support through CMake itself.\nThis makes it that using SoCMake for verifying Systems On Chip (SoC), where it is needed to compile some application code for the processor, it is not needed to have another build system for C++ or C compilation.",(0,t.jsx)("br",{}),"\nVery often today testbenches are written in C++ and simulated with Verilator, SoCMake also provides an easy way to create these testbenches and use common C++ build system for this task."]}),"\n",(0,t.jsx)(i.h3,{id:"socmake-ip-libraries",children:"SoCMake IP libraries"}),"\n",(0,t.jsxs)(i.p,{children:["The basic building block of SoCMake build system is an ",(0,t.jsx)(i.code,{children:"IP library"}),", which is just a wrapper around CMake ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries",children:"Interface Library"}),".\nThese library do not compile to any objects or executables, they are only used to carry files and information.\nIn case of Hardware designs, they can contain list of Verilog files."]}),"\n",(0,t.jsxs)(i.p,{children:['Although it is possible to support additional languages like Verilog and "compilers" like Verilator in CMake, in SoCMake for simplicity reasons ',(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/book/mastering-cmake/chapter/Custom%20Commands.html",children:"approach"})," of ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_custom_target.html",children:"add_custom_target()"})," and ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_custom_command.html",children:"add_custom_command()"})," pairs is used to provide support for different tools like Verilator, Yosys, Vivado \u2026"]}),"\n",(0,t.jsxs)(i.p,{children:["Modern CMake encourages the use of Targets instead of setting global variables. This way in SoCMake the way of passing different tool information and files along with your IP libraries is by setting different ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/set_property.html",children:"properties"})," to IP library targets."]}),"\n",(0,t.jsx)(i.p,{children:"The SoCMake provides an API to abstract the usage of these CMake concepts."}),"\n",(0,t.jsx)(i.h3,{id:"socmake-linking-ips-example",children:"SoCMake linking IPs example"}),"\n","\n","\n",(0,t.jsx)(i.p,{children:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.\nA simple example of such a IP hierarchy is shown below."}),"\n",(0,t.jsx)(n.i,{dot:c}),"\n",(0,t.jsxs)(i.p,{children:["The full example is provided in the examples section ",(0,t.jsx)(i.a,{href:"../examples/linking_ips",children:"here"})]})]})}function p(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},3443:(e,i,a)=>{"use strict";a.d(i,{A:()=>t});const t='digraph "example" {\nnode [\n fontsize = "12"\n];\n\n\n\n "node3" [ label = "prim00", shape = pentagon ];\n "node4" [ label = "prim01", shape = pentagon ];\n "node5" [ label = "prim10", shape = pentagon ];\n "node5" -> "node3" [ style = dashed ] // prim10 -> prim00\n "node6" [ label = "prim11", shape = pentagon ];\n "node6" -> "node3" [ style = dashed ] // prim11 -> prim00\n "node6" -> "node4" [ style = dashed ] // prim11 -> prim01\n "node7" [ label = "top", shape = pentagon ];\n "node7" -> "node5" [ style = dashed ] // top -> prim10\n "node7" -> "node6" [ style = dashed ] // top -> prim11\n}\n'},2938:()=>{},6120:()=>{},6984:()=>{},8453:(e,i,a)=>{"use strict";a.d(i,{R:()=>o,x:()=>r});var t=a(6540);const s={},n=t.createContext(s);function o(e){const i=t.useContext(n);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(n.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff07f179.613ed7f1.js b/assets/js/ff07f179.613ed7f1.js new file mode 100644 index 0000000..ba3de63 --- /dev/null +++ b/assets/js/ff07f179.613ed7f1.js @@ -0,0 +1 @@ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[515],{2692:(e,i,a)=>{"use strict";a.r(i),a.d(i,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,graph:()=>c,metadata:()=>l,toc:()=>h});var t=a(4848),s=a(8453),n=a(4782);const o={sidebar_position:3},r="Introduction",l={id:"build_system/intro",title:"Introduction",description:"SoCMake is built on top of CMake.",source:"@site/docs/build_system/intro.mdx",sourceDirName:"build_system",slug:"/build_system/intro",permalink:"/SoCMake/docs/build_system/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/build_system/intro.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Build System",permalink:"/SoCMake/docs/category/build-system"},next:{title:"Examples",permalink:"/SoCMake/docs/category/examples"}},d={},c=a(3443).A,h=[{value:"CMake",id:"cmake",level:2},{value:"CMake Useful links",id:"cmake-useful-links",level:3},{value:"Modern CMake",id:"modern-cmake",level:3},{value:"SoCMake",id:"socmake",level:2},{value:"SoCMake IP libraries",id:"socmake-ip-libraries",level:3},{value:"SoCMake linking IPs example",id:"socmake-linking-ips-example",level:3}];function m(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.h1,{id:"introduction",children:"Introduction"}),"\n",(0,t.jsxs)(i.p,{children:["SoCMake is built on top of ",(0,t.jsx)(i.a,{href:"https://cmake.org/documentation/",children:"CMake"}),"."]}),"\n",(0,t.jsx)(i.h2,{id:"cmake",children:"CMake"}),"\n",(0,t.jsx)(i.p,{children:'CMake stands for "Cross-Platform Make" and is a build system generator.\nBeing a build system generator CMake is not building the software on its own, but instead it generates Make/Ninja files that are used for the real compilation.'}),"\n",(0,t.jsx)(i.p,{children:"CMake build descriptions are described in a declarative CMake domain-specific language (DSL).\nAlthough the CMake language has a lot of issues, it is still a very powerful tool, and the biggest advantage is its maturity and widespread usage.\nAlthough C++ does not have a standard build system, CMake is surely the closest to being one."}),"\n",(0,t.jsx)(i.h3,{id:"cmake-useful-links",children:"CMake Useful links"}),"\n",(0,t.jsx)(i.p,{children:"There is plenty of CMake tutorials online and the documentation is decent, some useful links:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cmake.org/documentation/",children:"Documentation"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/guide/tutorial/index.html",children:"Official Tutorial"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/",children:"It's Time To Do CMake Right"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://www.youtube.com/watch?v=HPMvU64RUTY",children:"Jason Turner Intro Video"})}),"\n",(0,t.jsx)(i.li,{children:(0,t.jsx)(i.a,{href:"https://cliutils.gitlab.io/modern-cmake/",children:"Modern CMake"})}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"modern-cmake",children:"Modern CMake"}),"\n",(0,t.jsx)(i.p,{children:"CMake has a bad reputation for it's DSL, which could do things much better.\nIn CMake DSL every variable is a string, which can be pretty awkward and error prone at times.\nSetting aside those problems, it is still a very good build tool, and it provides a lot of flexibility compared to other available build systems."}),"\n",(0,t.jsx)(i.p,{children:"There is a big distinction between earlier versions of CMake and what is recommended today.\nThere are plenty of bad examples online of CMake code, typically coming from older CMake versions that one should avoid."}),"\n",(0,t.jsx)(i.p,{children:"Modern CMake is all about creating targets instead of global variables, and this fits really well into hardware IP hierarchy as it will be explained later.\nThis page will not give a tutorial to CMake as it is already done really well in previously linked tutorials."}),"\n",(0,t.jsx)(i.h2,{id:"socmake",children:"SoCMake"}),"\n",(0,t.jsx)(i.p,{children:"SoCMake is a set of functions for creating hardware IP blocks, composing them, packaging them and executing EDA tools on them."}),"\n",(0,t.jsxs)(i.p,{children:["The advantage to build systems like FuseSoC or hdlmake is that there is a native C++ compilation support through CMake itself.\nThis makes it that using SoCMake for verifying Systems On Chip (SoC), where it is needed to compile some application code for the processor, it is not needed to have another build system for C++ or C compilation.",(0,t.jsx)("br",{}),"\nVery often today testbenches are written in C++ and simulated with Verilator, SoCMake also provides an easy way to create these testbenches and use common C++ build system for this task."]}),"\n",(0,t.jsx)(i.h3,{id:"socmake-ip-libraries",children:"SoCMake IP libraries"}),"\n",(0,t.jsxs)(i.p,{children:["The basic building block of SoCMake build system is an ",(0,t.jsx)(i.code,{children:"IP library"}),", which is just a wrapper around CMake ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries",children:"Interface Library"}),".\nThese library do not compile to any objects or executables, they are only used to carry files and information.\nIn case of Hardware designs, they can contain list of Verilog files."]}),"\n",(0,t.jsxs)(i.p,{children:['Although it is possible to support additional languages like Verilog and "compilers" like Verilator in CMake, in SoCMake for simplicity reasons ',(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/book/mastering-cmake/chapter/Custom%20Commands.html",children:"approach"})," of ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_custom_target.html",children:"add_custom_target()"})," and ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/add_custom_command.html",children:"add_custom_command()"})," pairs is used to provide support for different tools like Verilator, Yosys, Vivado \u2026"]}),"\n",(0,t.jsxs)(i.p,{children:["Modern CMake encourages the use of Targets instead of setting global variables. This way in SoCMake the way of passing different tool information and files along with your IP libraries is by setting different ",(0,t.jsx)(i.a,{href:"https://cmake.org/cmake/help/latest/command/set_property.html",children:"properties"})," to IP library targets."]}),"\n",(0,t.jsx)(i.p,{children:"The SoCMake provides an API to abstract the usage of these CMake concepts."}),"\n",(0,t.jsx)(i.h3,{id:"socmake-linking-ips-example",children:"SoCMake linking IPs example"}),"\n","\n","\n",(0,t.jsx)(i.p,{children:"SoCMake promotes hierarchical design, by organizing IP blocks into IP libraries, we can easily reuse IP blocks into different designs.\nA simple example of such a IP hierarchy is shown below."}),"\n",(0,t.jsx)(n.i,{dot:c}),"\n",(0,t.jsxs)(i.p,{children:["The full example is provided in the examples section ",(0,t.jsx)(i.a,{href:"../examples/linking_ips",children:"here"})]})]})}function p(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},3443:(e,i,a)=>{"use strict";a.d(i,{A:()=>t});const t='digraph "example" {\nnode [\n fontsize = "12"\n];\n\n\n\n "node3" [ label = "prim00", shape = pentagon ];\n "node4" [ label = "prim01", shape = pentagon ];\n "node5" [ label = "prim10", shape = pentagon ];\n "node5" -> "node3" [ style = dashed ] // prim10 -> prim00\n "node6" [ label = "prim11", shape = pentagon ];\n "node6" -> "node3" [ style = dashed ] // prim11 -> prim00\n "node6" -> "node4" [ style = dashed ] // prim11 -> prim01\n "node7" [ label = "top", shape = pentagon ];\n "node7" -> "node5" [ style = dashed ] // top -> prim10\n "node7" -> "node6" [ style = dashed ] // top -> prim11\n}\n'},2938:()=>{},6120:()=>{},6984:()=>{},8453:(e,i,a)=>{"use strict";a.d(i,{R:()=>o,x:()=>r});var t=a(6540);const s={},n=t.createContext(s);function o(e){const i=t.useContext(n);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(n.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.1c9d3f43.js b/assets/js/main.1c9d3f43.js new file mode 100644 index 0000000..68ef6e3 --- /dev/null +++ b/assets/js/main.1c9d3f43.js @@ -0,0 +1,2 @@ +/*! For license information please see main.1c9d3f43.js.LICENSE.txt */ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"0d51f232":[()=>Promise.all([n.e(869),n.e(394),n.e(782),n.e(98)]).then(n.bind(n,6991)),"@site/docs/examples/linking_ips.mdx",6991],"0e384e19":[()=>n.e(976).then(n.bind(n,1512)),"@site/docs/intro.md",1512],"14eb3368":[()=>Promise.all([n.e(869),n.e(969)]).then(n.bind(n,4136)),"@theme/DocCategoryGeneratedIndexPage",4136],17896441:[()=>Promise.all([n.e(869),n.e(394),n.e(910),n.e(401)]).then(n.bind(n,3761)),"@theme/DocItem",3761],"1f391b9e":[()=>Promise.all([n.e(869),n.e(394),n.e(910),n.e(61)]).then(n.bind(n,7973)),"@theme/MDXPage",7973],"2075ce04":[()=>n.e(317).then(n.t.bind(n,8685,19)),"~docs/default/category-socmakedocs-tutorialsidebar-category-examples-6da.json",8685],"393be207":[()=>n.e(134).then(n.bind(n,6602)),"@site/src/pages/markdown-page.md",6602],"456dc1ab":[()=>Promise.all([n.e(869),n.e(233)]).then(n.bind(n,7597)),"@site/docs/getting_started.mdx",7597],"5e95c892":[()=>n.e(647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"935f2afb":[()=>n.e(581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],a7bd4aaa:[()=>n.e(717).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a94703ab:[()=>Promise.all([n.e(869),n.e(48)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],c1b67de1:[()=>Promise.all([n.e(869),n.e(394),n.e(80)]).then(n.bind(n,869)),"@site/docs/examples/simulation.md",869],c4f5d8e4:[()=>Promise.all([n.e(869),n.e(634)]).then(n.bind(n,2083)),"@site/src/pages/index.js",2083],cf98907a:[()=>n.e(688).then(n.bind(n,2385)),"@site/docs/api_documentation.mdx",2385],d00b2e22:[()=>n.e(538).then(n.t.bind(n,1966,19)),"/home/runner/work/SoCMake/SoCMake/docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],d6f35722:[()=>n.e(444).then(n.t.bind(n,4061,19)),"/home/runner/work/SoCMake/SoCMake/docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],dc8c471e:[()=>Promise.all([n.e(869),n.e(394),n.e(574)]).then(n.bind(n,1784)),"@site/docs/examples/verilator.mdx",1784],ef3c401e:[()=>n.e(274).then(n.t.bind(n,1151,19)),"~docs/default/category-socmakedocs-tutorialsidebar-category-build-system-c8e.json",1151],ff07f179:[()=>Promise.all([n.e(782),n.e(515)]).then(n.bind(n,2692)),"@site/docs/build_system/intro.mdx",2692]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:()=>n.e(237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},f=[],p=[],g=(0,u.A)(r);return Object.entries(g).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),a().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;return delete a.__context,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,{...a,...n})})}})}const f=[{path:"/SoCMake/markdown-page",component:d("/SoCMake/markdown-page","094"),exact:!0},{path:"/SoCMake/docs",component:d("/SoCMake/docs","335"),routes:[{path:"/SoCMake/docs",component:d("/SoCMake/docs","28f"),routes:[{path:"/SoCMake/docs",component:d("/SoCMake/docs","282"),routes:[{path:"/SoCMake/docs/api_documentation",component:d("/SoCMake/docs/api_documentation","82b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/build_system/intro",component:d("/SoCMake/docs/build_system/intro","01a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/category/build-system",component:d("/SoCMake/docs/category/build-system","963"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/category/examples",component:d("/SoCMake/docs/category/examples","f23"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/examples/linking_ips",component:d("/SoCMake/docs/examples/linking_ips","f48"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/examples/simulation",component:d("/SoCMake/docs/examples/simulation","67f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/examples/verilator",component:d("/SoCMake/docs/examples/verilator","13e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/getting_started",component:d("/SoCMake/docs/getting_started","5f2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/SoCMake/docs/intro",component:d("/SoCMake/docs/intro","e5f"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/SoCMake/",component:d("/SoCMake/","52c"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),a=n(5338),o=n(4625),i=n(545),l=n(8193);const s=[n(119),n(6134),n(6294),n(1043)];var u=n(8328),c=n(6347),d=n(2831),f=n(4848);function p(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var g=n(5260),m=n(4586),h=n(6025),y=n(6342),b=n(1003),v=n(2131),E=n(4090),S=n(2967),_=n(440),w=n(1463);function k(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,m.A)(),r=(0,v.o)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,f.jsxs)(g.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function T(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,m.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,m.A)(),{pathname:r}=(0,c.zy)();return e+(0,_.applyTrailingSlash)((0,h.A)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,f.jsxs)(g.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:a}),(0,f.jsx)("link",{rel:"canonical",href:a})]})}function x(){const{i18n:{currentLocale:e}}=(0,m.A)(),{metadata:t,image:n}=(0,y.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(g.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:E.w})]}),n&&(0,f.jsx)(b.be,{image:n}),(0,f.jsx)(T,{}),(0,f.jsx)(k,{}),(0,f.jsx)(w.A,{tag:S.Cy,locale:e}),(0,f.jsx)(g.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const C=new Map;function A(e){if(C.has(e.pathname))return{...e,pathname:C.get(e.pathname)};if((0,d.u)(u.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}var O=n(6125),N=n(6988),I=n(205);function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const L=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,I.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),R("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function P(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class D extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?R("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=R("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),P(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(L,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(c.qh,{location:t,render:()=>e})})}}const M=D,j="__docusaurus-base-url-issue-banner-container",U="__docusaurus-base-url-issue-banner",F="__docusaurus-base-url-issue-banner-suggestion-container";function B(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${j}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var q=n(6921);const Q=new Set,Z=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!J()&&!Z.has(e)&&!Q.has(e))(e))return!1;Q.add(e);const t=(0,d.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(K).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,q.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?X(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!Z.has(e))(e)&&(Z.add(e),P(e))},te=Object.freeze(ee),ne=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(i.vd,{children:(0,f.jsx)(o.Kd,{children:(0,f.jsx)(Y,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},l=()=>{if(ne)r.startTransition((()=>{a.hydrateRoot(e,t,{onRecoverableError:n})}));else{const o=a.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{o.render(t)}))}};P(window.location.pathname).then(l)}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/SoCMake/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/SoCMake/docs","mainDocId":"intro","docs":[{"id":"api_documentation","path":"/SoCMake/docs/api_documentation","sidebar":"tutorialSidebar"},{"id":"build_system/intro","path":"/SoCMake/docs/build_system/intro","sidebar":"tutorialSidebar"},{"id":"examples/linking_ips","path":"/SoCMake/docs/examples/linking_ips","sidebar":"tutorialSidebar"},{"id":"examples/simulation","path":"/SoCMake/docs/examples/simulation","sidebar":"tutorialSidebar"},{"id":"examples/verilator","path":"/SoCMake/docs/examples/verilator","sidebar":"tutorialSidebar"},{"id":"getting_started","path":"/SoCMake/docs/getting_started","sidebar":"tutorialSidebar"},{"id":"intro","path":"/SoCMake/docs/intro","sidebar":"tutorialSidebar"},{"id":"/category/build-system","path":"/SoCMake/docs/category/build-system","sidebar":"tutorialSidebar"},{"id":"/category/examples","path":"/SoCMake/docs/category/examples","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/SoCMake/docs/intro","label":"intro"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.1.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.1.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.1.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.1.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.1.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.1.1"}}}');var u=n(4848);const c={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){let{children:t}=e;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(8193),o=n(5260),i=n(440),l=n(781),s=n(4848);function u(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,s.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,s.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,s.jsx)(c,{error:t})]})}function c(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,s.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function d(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)(p,{fallback:()=>(0,s.jsx)(u,{error:t,tryAgain:n}),children:[(0,s.jsx)(o.A,{children:(0,s.jsx)("title",{children:"Page Error"})}),(0,s.jsx)(l.A,{children:(0,s.jsx)(u,{error:t,tryAgain:n})})]})}const f=e=>(0,s.jsx)(d,{...e});class p extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??f)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(4625),o=n(440),i=n(4586),l=n(6654),s=n(8193),u=n(3427),c=n(6025),d=n(4848);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:g,isActive:m,"data-noBrokenLinkCheck":h,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:E}}=(0,i.A)(),{withBaseUrl:S}=(0,c.h)(),_=(0,u.A)(),w=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>w.current));const k=f||p;const T=(0,l.A)(k),x=k?.replace("pathname://","");let C=void 0!==x?(A=x,y&&(e=>e.startsWith("/"))(A)?S(A):A):void 0;var A;C&&T&&(C=(0,o.applyTrailingSlash)(C,{trailingSlash:v,baseUrl:E}));const O=(0,r.useRef)(!1),N=n?a.k2:a.N_,I=s.A.canUseIntersectionObserver,R=(0,r.useRef)(),L=()=>{O.current||null==C||(window.docusaurus.preload(C),O.current=!0)};(0,r.useEffect)((()=>(!I&&T&&null!=C&&window.docusaurus.prefetch(C),()=>{I&&R.current&&R.current.disconnect()})),[R,C,I,T]);const P=C?.startsWith("#")??!1,D=!b.target||"_self"===b.target,M=!C||!T||!D||P;return h||!P&&M||_.collectLink(C),b.id&&_.collectAnchor(b.id),M?(0,d.jsx)("a",{ref:w,href:C,...k&&!T&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(N,{...b,onMouseEnter:L,onTouchStart:L,innerRef:e=>{w.current=e,I&&e&&T&&(R.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(R.current.unobserve(e),R.current.disconnect(),null!=C&&window.docusaurus.prefetch(C))}))})),R.current.observe(e))},to:C,...n&&{isActive:m,activeClassName:g}})}const p=r.forwardRef(f)},418:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>null},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),a=n(4848);function o(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return o(l({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,h:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.z)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const a=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),o=()=>(0,r.useContext)(a);function i(){return o()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const l=a?`${a}.${o}`:o;r(i)?e(i,l):t[l]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848);const o=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(o),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>m,vT:()=>f,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>g,jh:()=>p});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=function(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const u={},c=()=>i("docusaurus-plugin-content-docs")??u,d=e=>function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});const r=i(e),a=r?.[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0});function f(e){void 0===e&&(e={});const t=c(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function p(e){return d(e).versions}function g(e){const t=d(e);return l(t)}function m(e){const t=d(e),{pathname:n}=(0,r.zy)();return s(t,n)}function h(e){const t=d(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6134:(e,t,n)=>{"use strict";n.r(t);var r=n(8181),a=n(4784);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8872)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(8215),a=n(1312),o=n(6342),i=n(8774),l=n(3427);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(4848);function c(e){let{as:t,id:n,...c}=e;const d=(0,l.A)(),{navbar:{hideOnScroll:f}}=(0,o.p)();if("h1"===t||!n)return(0,u.jsx)(t,{...c,id:void 0});d.collectAnchor(n);const p=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,u.jsxs)(t,{...c,className:(0,r.A)("anchor",f?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,u.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":p,title:p,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(4848);function o(e){let{width:t=13.5,height:n=13.5}=e;return(0,a.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},781:(e,t,n)=>{"use strict";n.d(t,{A:()=>pt});var r=n(6540),a=n(8215),o=n(7489),i=n(1003),l=n(6347),s=n(1312),u=n(5062),c=n(4848);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,u.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const g=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function m(e){const t=e.children??g,{containerRef:n,onClick:r}=p();return(0,c.jsx)("div",{ref:n,role:"region","aria-label":g,children:(0,c.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,c.jsx)(m,{className:b.skipToContent})}var E=n(6342),S=n(5041);function _(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:a=1.2,className:o,...i}=e;return(0,c.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,c.jsx)("g",{stroke:r,strokeWidth:a,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const w={closeButton:"closeButton_CVFx"};function k(e){return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,a.A)("clean-btn close",w.closeButton,e.className),children:(0,c.jsx)(_,{width:14,height:14,strokeWidth:3.1})})}const T={content:"content_knG7"};function x(e){const{announcementBar:t}=(0,E.p)(),{content:n}=t;return(0,c.jsx)("div",{...e,className:(0,a.A)(T.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function A(){const{announcementBar:e}=(0,E.p)(),{isActive:t,close:n}=(0,S.Mj)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:o}=e;return(0,c.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:r,color:a},role:"banner",children:[o&&(0,c.jsx)("div",{className:C.announcementBarPlaceholder}),(0,c.jsx)(x,{className:C.announcementBarContent}),o&&(0,c.jsx)(k,{onClick:n,className:C.announcementBarClose})]})}var O=n(2069),N=n(3104);var I=n(9532),R=n(5600);const L=r.createContext(null);function P(e){let{children:t}=e;const n=function(){const e=(0,O.M)(),t=(0,R.YL)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,I.ZC)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return(0,c.jsx)(L.Provider,{value:n,children:t})}function D(e){if(e.component){const t=e.component;return(0,c.jsx)(t,{...e.props})}}function M(){const e=(0,r.useContext)(L);if(!e)throw new I.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,R.YL)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:D(o)})),[a,o,t])}function j(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:o}=M();return(0,c.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var U=n(5293),F=n(2303);function B(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function z(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function H(e){let{className:t,buttonClassName:n,value:r,onChange:o}=e;const i=(0,F.A)(),l=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,c.jsx)("div",{className:(0,a.A)($.toggle,t),children:(0,c.jsxs)("button",{className:(0,a.A)("clean-btn",$.toggleButton,!i&&$.toggleButtonDisabled,n),type:"button",onClick:()=>o("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite",children:[(0,c.jsx)(B,{className:(0,a.A)($.toggleIcon,$.lightToggleIcon)}),(0,c.jsx)(z,{className:(0,a.A)($.toggleIcon,$.darkToggleIcon)})]})})}const G=r.memo(H),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,E.p)().navbar.style,r=(0,E.p)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,U.G)();return r?null:(0,c.jsx)(G,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:a,onChange:o})}var Y=n(3465);function K(){return(0,c.jsx)(Y.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function X(){const e=(0,O.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,c.jsx)(_,{color:"var(--ifm-color-emphasis-600)"})})}function q(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(K,{}),(0,c.jsx)(W,{className:"margin-right--md"}),(0,c.jsx)(X,{})]})}var Q=n(8774),Z=n(6025),J=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:a,label:o,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...u}=e;const d=(0,Z.A)(r),f=(0,Z.A)(t),p=(0,Z.A)(a,{forcePrependBaseUrl:!0}),g=o&&a&&!(0,J.A)(a),m=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,g&&(0,c.jsx)(te.A,{...l&&{width:12,height:12}})]})};return a?(0,c.jsx)(Q.A,{href:s?p:a,...u,...m}):(0,c.jsx)(Q.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},...u,...m})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const o=(0,c.jsx)(ne,{className:(0,a.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,c.jsx)("li",{children:o}):o}function ae(e){let{className:t,isDropdownItem:n,...r}=e;return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ne,{className:(0,a.A)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const a=t?ae:re;return(0,c.jsx)(a,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),le=n(9169),se=n(4586);const ue={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ce(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:o,onClick:i,...l}=e;const s=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,c.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u}),children:[(0,c.jsx)(ne,{"aria-haspopup":"true","aria-expanded":u,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",o),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))},children:l.children??l.label}),(0,c.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Te,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:o,onClick:i,...s}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,se.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),d=ce(t,u),{collapsed:f,toggleCollapsed:p,setCollapsed:g}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&g(!d)}),[u,d,g]),(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,c.jsx)(ne,{role:"button",className:(0,a.A)(ue.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),p()},children:s.children??s.label}),(0,c.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(Te,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,c.jsx)(r,{...n})}var ge=n(2131);function me(e){let{width:t=20,height:n=20,...r}=e;return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";var ye=n(418);const be={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,c.jsx)("div",{className:(0,a.A)(n,be.navbarSearchContainer),children:t})}var Ee=n(4070),Se=n(4142);var _e=n(5597);const we=e=>e.docs.find((t=>t.id===e.mainDocId));const ke={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:a="",...o}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,se.A)(),f=(0,ge.o)(),{search:p,hash:g}=(0,l.zy)(),m=[...n,...u.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${g}${a}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,c.jsx)(pe,{...o,mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(me,{className:he}),h]}),items:m})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,c.jsx)(ve,{className:n,children:(0,c.jsx)(ye.A,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:o=!1}=e;const i=o?"li":"div";return(0,c.jsx)(i,{className:(0,a.A)({navbar__item:!r&&!o,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,Ee.zK)(r),i=(0,Se.QB)(t,r),l=o?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,c.jsx)(oe,{exact:!0,...a,isActive:()=>l||!!o?.sidebar&&o.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,Ee.zK)(r),i=(0,Se.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,c.jsx)(oe,{exact:!0,...a,isActive:()=>o?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...a}=e;const o=(0,Se.Vd)(r)[0],i=t??o.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return(0,c.jsx)(oe,{...a,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:a,dropdownItemsAfter:o,...i}=e;const{search:u,hash:d}=(0,l.zy)(),f=(0,Ee.zK)(n),p=(0,Ee.jh)(n),{savePreferredVersionName:g}=(0,_e.g1)(n),m=[...a,...p.map((e=>{const t=f.alternateDocVersions[e.name]??we(e);return{label:e.label,to:`${t.path}${u}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>g(e.name)}})),...o],h=(0,Se.Vd)(n)[0],y=t&&m.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=t&&m.length>1?void 0:we(h).path;return m.length<=1?(0,c.jsx)(oe,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,c.jsx)(pe,{...i,mobile:t,label:y,to:b,items:m,isActive:r?()=>!1:void 0})}};function Te(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=ke[r];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,c.jsx)(a,{...n})}function xe(){const e=(0,O.M)(),t=(0,E.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Te,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ce(e){return(0,c.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ae(){const e=0===(0,E.p)().navbar.items.length,t=M();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(Ce,{onClick:()=>t.hide()}),t.content]})}function Oe(){const e=(0,O.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,c.jsx)(j,{header:(0,c.jsx)(q,{}),primaryMenu:(0,c.jsx)(xe,{}),secondaryMenu:(0,c.jsx)(Ae,{})}):null}const Ne={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ie(e){return(0,c.jsx)("div",{role:"presentation",...e,className:(0,a.A)("navbar-sidebar__backdrop",e.className)})}function Re(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,E.p)(),i=(0,O.M)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,N.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+u{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,c.jsxs)("nav",{ref:l,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.A)("navbar","navbar--fixed-top",n&&[Ne.navbarHideable,!d&&Ne.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown}),children:[t,(0,c.jsx)(Ie,{onClick:i.toggle}),(0,c.jsx)(Oe,{})]})}var Le=n(440);const Pe={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function De(e){return(0,c.jsx)("button",{type:"button",...e,children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Me(e){let{error:t}=e;const n=(0,Le.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{className:Pe.errorBoundaryError,children:n})}class je extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Ue="right";function Fe(e){let{width:t=30,height:n=30,className:r,...a}=e;return(0,c.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...a,children:(0,c.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Be(){const{toggle:e,shown:t}=(0,O.M)();return(0,c.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,c.jsx)(Fe,{})})}const ze={colorModeToggle:"colorModeToggle_DEke"};function $e(e){let{items:t}=e;return(0,c.jsx)(c.Fragment,{children:t.map(((e,t)=>(0,c.jsx)(je,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,c.jsx)(Te,{...e})},t)))})}function He(e){let{left:t,right:n}=e;return(0,c.jsxs)("div",{className:"navbar__inner",children:[(0,c.jsx)("div",{className:"navbar__items",children:t}),(0,c.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function Ge(){const e=(0,O.M)(),t=(0,E.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Ue)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return(0,c.jsx)(He,{left:(0,c.jsxs)(c.Fragment,{children:[!e.disabled&&(0,c.jsx)(Be,{}),(0,c.jsx)(K,{}),(0,c.jsx)($e,{items:n})]}),right:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)($e,{items:r}),(0,c.jsx)(W,{className:ze.colorModeToggle}),!a&&(0,c.jsx)(ve,{children:(0,c.jsx)(ye.A,{})})]})})}function Ve(){return(0,c.jsx)(Re,{children:(0,c.jsx)(Ge,{})})}function We(e){let{item:t}=e;const{to:n,href:r,label:a,prependBaseUrlToHref:o,...i}=t,l=(0,Z.A)(n),s=(0,Z.A)(r,{forcePrependBaseUrl:!0});return(0,c.jsxs)(Q.A,{className:"footer__link-item",...r?{href:o?s:r}:{to:l},...i,children:[a,r&&!(0,J.A)(r)&&(0,c.jsx)(te.A,{})]})}function Ye(e){let{item:t}=e;return t.html?(0,c.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)("li",{className:"footer__item",children:(0,c.jsx)(We,{item:t})},t.href??t.to)}function Ke(e){let{column:t}=e;return(0,c.jsxs)("div",{className:"col footer__col",children:[(0,c.jsx)("div",{className:"footer__title",children:t.title}),(0,c.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,c.jsx)(Ye,{item:e},t)))})]})}function Xe(e){let{columns:t}=e;return(0,c.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,c.jsx)(Ke,{column:e},t)))})}function qe(){return(0,c.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Qe(e){let{item:t}=e;return t.html?(0,c.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)(We,{item:t})}function Ze(e){let{links:t}=e;return(0,c.jsx)("div",{className:"footer__links text--center",children:(0,c.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(Qe,{item:e}),t.length!==n+1&&(0,c.jsx)(qe,{})]},n)))})})}function Je(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,c.jsx)(Xe,{columns:t}):(0,c.jsx)(Ze,{links:t})}var et=n(1122);const tt={footerLogoLink:"footerLogoLink_BH7S"};function nt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,Z.h)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,c.jsx)(et.A,{className:(0,a.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function rt(e){let{logo:t}=e;return t.href?(0,c.jsx)(Q.A,{href:t.href,className:tt.footerLogoLink,target:t.target,children:(0,c.jsx)(nt,{logo:t})}):(0,c.jsx)(nt,{logo:t})}function at(e){let{copyright:t}=e;return(0,c.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function ot(e){let{style:t,links:n,logo:r,copyright:o}=e;return(0,c.jsx)("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===t}),children:(0,c.jsxs)("div",{className:"container container-fluid",children:[n,(r||o)&&(0,c.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,c.jsx)("div",{className:"margin-bottom--sm",children:r}),o]})]})})}function it(){const{footer:e}=(0,E.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:a}=e;return(0,c.jsx)(ot,{style:a,links:n&&n.length>0&&(0,c.jsx)(Je,{links:n}),logo:r&&(0,c.jsx)(rt,{logo:r}),copyright:t&&(0,c.jsx)(at,{copyright:t})})}const lt=r.memo(it),st=(0,I.fM)([U.a,S.oq,N.Tv,_e.VQ,i.Jx,function(e){let{children:t}=e;return(0,c.jsx)(R.y_,{children:(0,c.jsx)(O.e,{children:(0,c.jsx)(P,{children:t})})})}]);function ut(e){let{children:t}=e;return(0,c.jsx)(st,{children:t})}var ct=n(1107);function dt(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(ct.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(De,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(Me,{error:t})})]})})})}const ft={mainWrapper:"mainWrapper_z2l0"};function pt(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,y.J)(),(0,c.jsxs)(ut,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(A,{}),(0,c.jsx)(Ve,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.wrapper.main,ft.mainWrapper,r),children:(0,c.jsx)(o.A,{fallback:e=>(0,c.jsx)(dt,{...e}),children:t})}),!n&&(0,c.jsx)(lt,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(8774),a=n(6025),o=n(4586),i=n(6342),l=n(1122),s=n(4848);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,a.A)(t.src),dark:(0,a.A)(t.srcDark||t.src)},i=(0,s.jsx)(l.A,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function c(e){const{siteConfig:{title:t}}=(0,o.A)(),{navbar:{title:n,logo:l}}=(0,i.p)(),{imageClassName:c,titleClassName:d,...f}=e,p=(0,a.A)(l?.href||"/"),g=n?"":t,m=l?.alt??g;return(0,s.jsxs)(r.A,{to:p,...f,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(u,{logo:l,alt:m,imageClassName:c}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),a=n(5066),o=n(2303),i=n(5293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(4848);function u(e){let{className:t,children:n}=e;const u=(0,o.A)(),{colorMode:c}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(u?"dark"===c?["dark"]:["light"]:["light","dark"]).map((e=>{const o=n({theme:e,className:(0,a.A)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:o},e)}))})}function c(e){const{sources:t,className:n,alt:r,...a}=e;return(0,s.jsx)(u,{className:n,children:e=>{let{theme:n,className:o}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:o,...a})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>u});var r=n(6540),a=n(8193),o=n(205),i=n(3109),l=n(4848);const s="ease-in-out";function u(e){let{initialState:t}=e;const[n,a]=(0,r.useState)(t??!1),o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return{collapsed:n,setCollapsed:a,toggleCollapsed:o}}const c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:a}=e;const o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=a?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${a?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return f(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=c.height,e.style.overflow=c.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,a])}function g(e){if(!a.A.canUseDOM)return e?c:d}function m(e){let{as:t="div",collapsed:n,children:a,animation:o,onCollapseTransitionEnd:i,className:s,disableSSRStyle:u}=e;const c=(0,r.useRef)(null);return p({collapsibleRef:c,collapsed:n,animation:o}),(0,l.jsx)(t,{ref:c,style:u?void 0:g(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(c.current,n),i?.(n))},className:s,children:a})}function h(e){let{collapsed:t,...n}=e;const[a,i]=(0,r.useState)(!t),[s,u]=(0,r.useState)(t);return(0,o.A)((()=>{t||i(!0)}),[t]),(0,o.A)((()=>{a&&u(t)}),[a,t]),a?(0,l.jsx)(m,{...n,collapsed:s}):null}function y(e){let{lazy:t,...n}=e;const r=t?h:m;return(0,l.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>m,oq:()=>g});var r=n(6540),a=n(2303),o=n(9466),i=n(9532),l=n(6342),s=n(4848);const u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=()=>"true"===u.get(),f=e=>u.set(String(e)),p=r.createContext(null);function g(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,a.A)(),[n,o]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{o(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&f(!1),!r&&d()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function m(){const e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>h});var r=n(6540),a=n(8193),o=n(9532),i=n(9466),l=n(6342),s=n(4848);const u=r.createContext(void 0),c="theme",d=(0,i.Wf)(c),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,g=e=>a.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),m=e=>{d.set(p(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[a,o]=(0,r.useState)(g(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[a,i])}();return(0,s.jsx)(u.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(u);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(4142),s=n(9532),u=n(9466),c=n(4848);const d=e=>`docs-preferred-version-${e}`,f={save:(e,t,n)=>{(0,u.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,u.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,u.Wf)(d(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const g=r.createContext(null);function m(){const e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=f.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(f.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){f.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return(0,c.jsx)(g.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return l.C5?(0,c.jsx)(h,{children:t}):(0,c.jsx)(c.Fragment,{children:t})}function b(){const e=(0,r.useContext)(g);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.W);const t=(0,a.ht)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},6588:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),a=n(9532),o=n(4848);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:a}=e;const i=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function u(){const e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},2069:(e,t,n)=>{"use strict";n.d(t,{M:()=>p,e:()=>f});var r=n(6540),a=n(5600),o=n(4581),i=n(7485),l=n(6342),s=n(9532),u=n(4848);const c=r.createContext(void 0);function d(){const e=function(){const e=(0,a.YL)(),{items:t}=(0,l.p)().navbar;return 0===t.length&&!e.component}(),t=(0,o.l)(),n=!e&&"mobile"===t,[s,u]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(s)return u(!1),!1}));const c=(0,r.useCallback)((()=>{u((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&u(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:s})),[e,n,c,s])}function f(e){let{children:t}=e;const n=d();return(0,u.jsx)(c.Provider,{value:n,children:t})}function p(){const e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){let{component:t,props:n}=e;const o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");const[,l]=o,s=(0,a.Be)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,l]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){l(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},4142:(e,t,n)=>{"use strict";n.d(t,{$S:()=>m,B5:()=>x,C5:()=>f,Nr:()=>g,OF:()=>_,QB:()=>T,Vd:()=>w,Y:()=>E,cC:()=>p,d1:()=>C,fW:()=>k,w8:()=>b});var r=n(6540),a=n(6347),o=n(2831),i=n(4070),l=n(5597),s=n(2252),u=n(6588),c=n(1682),d=n(9169);const f=!!i.Gy;function p(e){const t=(0,s.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function g(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=g(t);if(e)return e}}(e):void 0:e.href}function m(){const{pathname:e}=(0,a.zy)(),t=(0,u.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=S({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,d.ys)(e,t),y=(e,t)=>e.some((e=>b(e,t)));function b(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||y(e.items,t))}function v(e,t){switch(e.type){case"category":return b(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||b(e,t);default:return!0}}function E(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function S(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.ys)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.ys)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function _(){const e=(0,u.t)(),{pathname:t}=(0,a.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?S({sidebarItems:e.items,pathname:t}):null}function w(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,l.g1)(e),a=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,c.s)([t,n,a].filter(Boolean))),[t,n,a])}function k(e,t){const n=w(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function T(e,t){const n=w(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,c.s)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function x(e){let{route:t}=e;const n=(0,a.zy)(),r=(0,s.r)(),i=t.routes,l=i.find((e=>(0,a.B6)(n.pathname,e)));if(!l)return null;const u=l.sidebar,c=u?r.docsSidebars[u]:void 0;return{docElement:(0,o.v)(i),sidebarName:u,sidebarItems:c}}function C(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!g(e)))}},7485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l});var r=n(6540),a=n(6347),o=n(9532);function i(e){!function(e){const t=(0,a.W6)(),n=(0,o._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function l(e){return function(e){const t=(0,a.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},1682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function a(e){return Array.from(new Set(e))}n.d(t,{X:()=>r,s:()=>a})},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>p,be:()=>d,Jx:()=>g});var r=n(6540),a=n(5066),o=n(5260),i=n(3102);function l(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(6025),u=n(4586);var c=n(4848);function d(e){let{title:t,description:n,keywords:r,image:a,children:i}=e;const l=function(e){const{siteConfig:t}=(0,u.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,s.h)(),f=a?d(a,{absolute:!0}):void 0;return(0,c.jsxs)(o.A,{children:[t&&(0,c.jsx)("title",{children:l}),t&&(0,c.jsx)("meta",{property:"og:title",content:l}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,c.jsx)("meta",{property:"og:image",content:f}),f&&(0,c.jsx)("meta",{name:"twitter:image",content:f}),i]})}const f=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(f),l=(0,a.A)(i,t);return(0,c.jsxs)(f.Provider,{value:l,children:[(0,c.jsx)(o.A,{children:(0,c.jsx)("html",{className:l})}),n]})}function g(e){let{children:t}=e;const n=l(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(p,{className:(0,a.A)(r,o),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>u,ZC:()=>l,_q:()=>i,dV:()=>s,fM:()=>c});var r=n(6540),a=n(205),o=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,a.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,a.A)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function u(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return(0,o.jsx)(o.Fragment,{children:e.reduceRight(((e,t)=>(0,o.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>c,a_:()=>g,gk:()=>m});var r=n(6540),a=n(8193),o=n(2303),i=n(205),l=n(9532),s=n(4848);const u=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(u.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(u);if(null==e)throw new l.dV("ScrollControllerProvider");return e}const f=()=>a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),a=(0,r.useRef)(f()),o=(0,l._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=f();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function g(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),a=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:a}}function m(){const e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>r,tU:()=>a});n(4586);const r="default";function a(e,t){return`docs-${e}-${t}`}},9466:(e,t,n)=>{"use strict";n.d(t,{Dv:()=>c,Wf:()=>u});var r=n(6540);const a="localStorage";function o(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=i(t?.persistence);return null===n?s:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function c(e,t){const n=(0,r.useRef)((()=>null===e?s:u(e,t))).current(),a=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(a,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.A)(),{pathname:s}=(0,a.zy)(),u=(0,o.applyTrailingSlash)(s,{trailingSlash:n,baseUrl:e}),c=l===i?e:e.replace(`/${l}/`,"/"),d=u.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${c}`:`${c}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(9532);function i(e){const t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(253);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>E,TM:()=>x,yJ:()=>p,sC:()=>A,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var g=i.join("/");return n&&"/"!==g.substr(-1)&&(g+="/"),g};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,m(),E.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(E.entries[E.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=E.index+e;return t>=0&&t{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(g){var a=p(n);a&&a!==g&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),m=s(n),h=0;h{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5302:(e,t,n)=>{var r=n(4634);e.exports=p,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(i,p),i=p+d.length,f)l+=f[1];else{var g=e[i],m=n[2],h=n[3],y=n[4],b=n[5],v=n[6],E=n[7];l&&(r.push(l),l="");var S=null!=m&&null!=g&&g!==m,_="+"===v||"*"===v,w="?"===v||"*"===v,k=n[2]||c,T=y||b;r.push({name:h||o++,prefix:m||"",delimiter:k,optional:w,repeat:_,partial:S,asterisk:!!E,pattern:T?u(T):E?".*":"[^"+s(k)+"]+?"})}}return i{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i{Prism.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}},7839:()=>{!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(Prism)},2514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),g=f.indexOf(p);if(g>-1){++a;var m=f.substring(0,g),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(g+p.length),b=[];m&&b.push.apply(b,i([m])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},1260:()=>{Prism.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}},8872:(e,t,n)=>{var r={"./prism-bash":7022,"./prism-cmake":2509,"./prism-diff":7839,"./prism-json":2514,"./prism-verilog":1260};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8872},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n