<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sakshi Garg | UCSC OSPO</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/</link><atom:link href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/index.xml" rel="self" type="application/rss+xml"/><description>Sakshi Garg</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><image><url>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/avatar_hudf40758e8f29f187d0dc02a46779a875_73196_270x270_fill_lanczos_center_3.png</url><title>Sakshi Garg</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/</link></image><item><title>LiveHD</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/project/osre24/ucsc/livehd/</link><pubDate>Thu, 01 Feb 2024 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/project/osre24/ucsc/livehd/</guid><description>&lt;p>The goals is to enable a more productive flow where the ASIC/FPGA designer can
work with multiple hardware description languages like CHISEL, Pyrope, or
Verilog.&lt;/p>
&lt;p>There are several projects, some compiler infrastructure around
&lt;a href="https://github.com/masc-ucsc/livehd" target="_blank" rel="noopener">LiveHD&lt;/a>. Others around how to interface
LLMs to improve chip design productivity.&lt;/p>
&lt;p>There are the following projects available:&lt;/p>
&lt;ul>
&lt;li>Slang with LiveHD&lt;/li>
&lt;li>Hardware Hierarchical Dynamic Structures (hdds)&lt;/li>
&lt;li>HDLEval for LLMs&lt;/li>
&lt;li>C++ Profiler Optimizer with LLMs&lt;/li>
&lt;li>Decompiler from Assembly to C++ with LLMs&lt;/li>
&lt;/ul>
&lt;h2 id="slang-with-livehd">Slang with LiveHD&lt;/h2>
&lt;h3 id="project-idea">Project Idea&lt;/h3>
&lt;p>&lt;a href="https://github.com/MikePopoloski/slang" target="_blank" rel="noopener">slang&lt;/a> is one of the best open source
Verilog front-ends available. &lt;a href="https://github.com/masc-ucsc/livehd" target="_blank" rel="noopener">LiveHD&lt;/a>
uses slang, but only a subset of Verilog is supported. The goal is to add more slang features.&lt;/p>
&lt;h3 id="project-deliverable">Project Deliverable&lt;/h3>
&lt;p>The slang/LiveHD interface creates LiveHD IR (LNAST IR). The plan is to keep
extending the translation to support more features. This is a project that
allows small steps. The goal is to support all Verilog 2001, and potentially
some System Verilog features.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Topics:&lt;/strong> SysteVerilog, Compilers&lt;/li>
&lt;li>&lt;strong>Skills Needed:&lt;/strong> Knowledge of Verilog, C++17, some compiler background.&lt;/li>
&lt;li>&lt;strong>Difficulty:&lt;/strong> Medium&lt;/li>
&lt;li>&lt;strong>Size:&lt;/strong> Large&lt;/li>
&lt;li>&lt;strong>Mentor:&lt;/strong> &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a>, &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="hardware-hierarchical-dynamic-structures-hdds">Hardware Hierarchical Dynamic Structures (hdds)&lt;/h2>
&lt;h3 id="project-idea-1">Project Idea&lt;/h3>
&lt;p>&lt;a href="https://github.com/masc-ucsc/hhds" target="_blank" rel="noopener">hdds&lt;/a> aims to build efficient tree and
graph data structures commonly used by hardware compilers. A key difference is
the hierarchical nature, and patterns.&lt;/p>
&lt;h3 id="project-deliverable-1">Project Deliverable&lt;/h3>
&lt;p>There are 2 main components: Graph and Tree.&lt;/p>
&lt;p>For each, there is a hierarchical implementation that allows to connect tree/graphs in a hieararchy.
For example, a graph can call another graph with input and outputs like a Verilog module calls other Verilog modules.&lt;/p>
&lt;p>Both classes should have iterators for traversing in topological sort.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Topics:&lt;/strong> Data structures for compilers&lt;/li>
&lt;li>&lt;strong>Skills Needed:&lt;/strong> Data structures, C++17&lt;/li>
&lt;li>&lt;strong>Difficulty:&lt;/strong> Medium&lt;/li>
&lt;li>&lt;strong>Size:&lt;/strong> Large&lt;/li>
&lt;li>&lt;strong>Mentor:&lt;/strong> &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a>, &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="hdleval-for-llms">HDLEval for LLMs&lt;/h2>
&lt;h3 id="project-idea-2">Project Idea&lt;/h3>
&lt;p>LLMs can be used to create new hardware. The goal of this project is to create multiple prompts
so that LLM/compiler designers can have examples to improve their flows.&lt;/p>
&lt;h3 id="project-deliverable-2">Project Deliverable&lt;/h3>
&lt;p>The idea is to create many sample projects where a &amp;ldquo;input&amp;rdquo; creates a Verilog artifact. The specification should not assume Verilog as output because other HDLs like Chisel could be used.&lt;/p>
&lt;p>The goal is to create many sample circuits that are realistic and practical. The description can have&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Topics:&lt;/strong> Verilog, LLMs&lt;/li>
&lt;li>&lt;strong>Skills Needed:&lt;/strong> Verilog or Chisel&lt;/li>
&lt;li>&lt;strong>Difficulty:&lt;/strong> Low&lt;/li>
&lt;li>&lt;strong>Size:&lt;/strong> Small or medium&lt;/li>
&lt;li>&lt;strong>Mentor:&lt;/strong> &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="c-profiler-optimizer-with-llms">C++ Profiler Optimizer with LLMs&lt;/h2>
&lt;h3 id="project-idea-3">Project Idea&lt;/h3>
&lt;p>Fine-tune, and/or RAG, a LLM to leverage profiling tools so that it can provide
code optimization recommendations for C++ and possibly Rust code.&lt;/p>
&lt;h3 id="project-deliverable-3">Project Deliverable&lt;/h3>
&lt;p>Create a Python package (poetry?) called aiprof that analyzes the execution of a C++ or Rust program and
provide code change recommendations to improve performance.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">aiprof ./binary
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>aiprof uses perf tools but also other tools like redspy, zerospy, and loadspy
to find problematic code areas and drive the GPT optimizer.&lt;/p>
&lt;p>The plan is to find several examples of transformations to have a database so
that a model like CodeLlama or mixtral can be fine-tuned with code optimization
recomendations.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Topics:&lt;/strong> C++, perf tools&lt;/li>
&lt;li>&lt;strong>Skills Needed:&lt;/strong> C++17, Linux performance counters&lt;/li>
&lt;li>&lt;strong>Difficulty:&lt;/strong> Medium&lt;/li>
&lt;li>&lt;strong>Size:&lt;/strong> Large&lt;/li>
&lt;li>&lt;strong>Mentor:&lt;/strong> &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="decompiler-from-assembly-to-c-with-llms">Decompiler from Assembly to C++ with LLMs&lt;/h2>
&lt;h3 id="project-idea-4">Project Idea&lt;/h3>
&lt;p>There are several decompilers from assembly to C like ghidra and retdec. The idea is to enhance
both outputs to feed an LLM to generate nicer C++ code.&lt;/p>
&lt;h3 id="project-deliverable-4">Project Deliverable&lt;/h3>
&lt;p>ghidra and retdec generate C code out of assembly. The idea is to start with
these tools as baseline, but feed it to a LLM to generate C++ code instead of
plain C.&lt;/p>
&lt;p>Create a Python package (poetry?) called aidecomp that integrates both
decompilers. It allows to target C or C++17.&lt;/p>
&lt;p>To check that the generated code is compatible with the function translated, a
fuzzer could be used. This allows aidecomp to iterate the generation if the
generated code is not equivalent.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Topics:&lt;/strong> C++, decompilers&lt;/li>
&lt;li>&lt;strong>Skills Needed:&lt;/strong> C++17&lt;/li>
&lt;li>&lt;strong>Difficulty:&lt;/strong> Medium&lt;/li>
&lt;li>&lt;strong>Size:&lt;/strong> Large&lt;/li>
&lt;li>&lt;strong>Mentor:&lt;/strong> &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>LiveHD (2023)</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/project/osre23/ucsc/livehd/</link><pubDate>Mon, 07 Nov 2022 10:15:56 -0700</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/project/osre23/ucsc/livehd/</guid><description>&lt;p>Projects for &lt;a href="https://github.com/masc-ucsc/livehd" target="_blank" rel="noopener">LiveHD&lt;/a>.&lt;br>
Lead Mentors: &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/jose-renau/">Jose Renau&lt;/a> and &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>.&lt;br>
Contributor(s): &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/shahzaib-kashif/">Shahzaib Kashif&lt;/a>&lt;/p>
&lt;p>LiveHD is a &amp;ldquo;compiler&amp;rdquo; infrastructure for hardware design optimized for synthesis and simulation. The goals is to enable a more productive flow where the ASIC/FPGA designer can work with multiple hardware description languages like CHISEL, Pyrope, or Verilog.&lt;/p>
&lt;p>There are several projects available around LiveHD. A longer explanation and more project options are available at
&lt;a href="https://github.com/masc-ucsc/livehd/blob/master/docs/projects.md" target="_blank" rel="noopener">projects&lt;/a>. Contact the
mentors to find a project that fits your interests.&lt;/p>
&lt;p>A sample of helpful projects:&lt;/p>
&lt;h3 id="mockturtle">Mockturtle&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Title&lt;/td>
&lt;td>Mockturtle&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Description&lt;/td>
&lt;td>Perform synthesis for graph in LiveHD using Mockturtle&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mentor(s)&lt;/td>
&lt;td>Jose Renau and &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Skills&lt;/td>
&lt;td>C++17, synthesis&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Difficulty&lt;/td>
&lt;td>Medium&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Size&lt;/td>
&lt;td>Medium 175 hours&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://github.com/masc-ucsc/livehd/blob/master/docs/projects_large.md#medium-parallel-and-hierarchical-synthesis-with-mockturtle" target="_blank" rel="noopener">Link&lt;/a>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Mockturtle (&lt;a href="https://github.com/lsils/mockturtle" target="_blank" rel="noopener">https://github.com/lsils/mockturtle&lt;/a>) is a synthesis tool partially
integrated with LiveHD. The goal of this task is to iron out bugs and issues
and to use the LiveHD Tasks API to parallelize the synthesis.&lt;/p>
&lt;p>Main features:&lt;/p>
&lt;ul>
&lt;li>The current synthesis divides the circuit in partitions. Each partition can be synthesized in parallel.&lt;/li>
&lt;li>Support hierarchical synthesis to optimize cross Lgraphs (cross verilog module optimization)&lt;/li>
&lt;/ul>
&lt;p>The goal is to use Mockturtle (&lt;a href="https://github.com/lsils/mockturtle" target="_blank" rel="noopener">https://github.com/lsils/mockturtle&lt;/a>) with LiveHD. The main characteristics:&lt;/p>
&lt;ul>
&lt;li>Use mockturtle to tmap to LUTs&lt;/li>
&lt;li>Use mockturtle to synthesize (optimize) logic&lt;/li>
&lt;li>Enable cut-rewrite as an option&lt;/li>
&lt;li>Enable hierarchy cross optimization (hier:true option)&lt;/li>
&lt;li>Use the graph labeling to find cluster to optimize&lt;/li>
&lt;li>Re-timing&lt;/li>
&lt;li>Map to LUTs only gates and non-wide arithmetic. E.g: 32bit add is not mapped to LUTS, but a 2-bit add is mapped.&lt;/li>
&lt;li>List of resources to not map:
&lt;ul>
&lt;li>Large ALUs. Large ALUs should have an OpenWare block (hardcoded in FPGAs and advanced adder options in ASIC)&lt;/li>
&lt;li>Multipliers and dividers&lt;/li>
&lt;li>Barrell shifters with not trivial shifts (1-2 bits) selectable at run-time&lt;/li>
&lt;li>memories, luts&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="livehd-console">LiveHD Console&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Title&lt;/td>
&lt;td>LiveHD Console&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Description&lt;/td>
&lt;td>Create a console app that interacts with LiveHD to query parameters about designs&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mentor(s)&lt;/td>
&lt;td>Jose Renau and &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Skills&lt;/td>
&lt;td>C++17&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Difficulty&lt;/td>
&lt;td>Medium&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Size&lt;/td>
&lt;td>Medium 175 hours&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://github.com/masc-ucsc/livehd/blob/master/docs/projects_small.md#medium-query-shell-not-lgshell-to-query-graphs" target="_blank" rel="noopener">Link&lt;/a>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Current LiveHD uses replxx but it a no longer maintained shell/console. The result is that it fails in newer versions of OSX.&lt;/p>
&lt;p>There is an alternative Crossline (&lt;a href="https://github.com/jcwangxp/Crossline%29" target="_blank" rel="noopener">https://github.com/jcwangxp/Crossline)&lt;/a>. This affects main/main.cpp and nothing else.&lt;/p>
&lt;p>In addition to replace the current console with auto-completion, the plan is to add &amp;ldquo;query&amp;rdquo; capacity to visualize some
of the LiveHD internals.&lt;/p>
&lt;ul>
&lt;li>Query bits, ports&amp;hellip; like
&lt;ul>
&lt;li>&lt;a href="https://github.com/rubund/netlist-analyzer" target="_blank" rel="noopener">https://github.com/rubund/netlist-analyzer&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.jameswhanlon.com/querying-logical-paths-in-a-verilog-design.html" target="_blank" rel="noopener">https://www.jameswhanlon.com/querying-logical-paths-in-a-verilog-design.html&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>It would be cool if subsections (selected) parts can be visualized with something like &lt;a href="https://github.com/nturley/netlistsvg" target="_blank" rel="noopener">https://github.com/nturley/netlistsvg&lt;/a>&lt;/li>
&lt;li>The shell may be expanded to support simulation in the future&lt;/li>
&lt;li>Wavedrom/Duh dumps&lt;/li>
&lt;/ul>
&lt;p>Wavedrom and duh allows to dump bitfield information for structures. It would be interesting to explore to dump tables and bit
fields for Lgraph IOs, and structs/fields inside the module. It may be a way to integrate with the documentation generation.&lt;/p>
&lt;p>Example of queries: show path, show driver/sink of, do topo traversal,&amp;hellip;.&lt;/p>
&lt;h3 id="compiler-error-generation-pass">Compiler error generation pass&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Title&lt;/td>
&lt;td>Lgraph and LNAST check pass&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Description&lt;/td>
&lt;td>Create a pass that check the integrity/correctness of Lgraph and LNAST&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mentor(s)&lt;/td>
&lt;td>Jose Renau and &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sakshi-garg/">Sakshi Garg&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Skills&lt;/td>
&lt;td>C++17&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Difficulty&lt;/td>
&lt;td>Medium&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Size&lt;/td>
&lt;td>Large 350 hours&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://github.com/masc-ucsc/livehd/blob/master/docs/projects_small.md#medium-diagnostics" target="_blank" rel="noopener">Link&lt;/a>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Create a pass that checks that the Lgraph (and/or LNAST) is semantically
correct. The LNAST already has quite a few tests (pass.semantic), but it can be
further expanded. Some checks:&lt;/p>
&lt;ul>
&lt;li>No combinational loops&lt;/li>
&lt;li>No mismatch in bit widths&lt;/li>
&lt;li>No disconnected nodes&lt;/li>
&lt;li>Check for inefficient splits (do not split buses that can be combined)&lt;/li>
&lt;li>Transformations stages should not drop names if same net is preserved&lt;/li>
&lt;li>No writes in LNAST that are never read&lt;/li>
&lt;li>All the edges are possible. E.g: no pin &amp;lsquo;C&amp;rsquo; in Sum_op&lt;/li>
&lt;/ul></description></item></channel></rss>