aboutsummaryrefslogtreecommitdiffstats
path: root/backends/verilog/verilog_backend.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #63 from wluker/verilog-backend-memClifford Wolf2015-05-111-1/+2
|\ | | | | Fixed bug in $mem cell verilog code generation.
| * Fixed bug in $mem cell verilog code generation.luke whittlesey2015-05-111-11/+12
| |
* | Disabled broken $mem support in verilog backendClifford Wolf2015-05-101-11/+11
|/
* Made changes recommended by Clifford Wolf ...luke whittlesey2015-05-101-22/+11
| | | | | | Removed bit_check_equal(), used RTLIL::SigBit for individual bits, used dict<> instead of std::map, and used RTLIL::SigSpec instead of std::vector.
* Verilog backend for $mem cells should now be able to handle differentluke whittlesey2015-05-081-50/+105
| | | | write-enable bits and RD_TRANSPARENT parameter settings.
* Added support for $mem cells in the verilog backend.luke whittlesey2015-05-071-1/+120
|
* Minor fixes in handling of "init" attributeClifford Wolf2015-04-091-7/+7
|
* Added "init" attribute support to verilog backendClifford Wolf2015-04-041-0/+5
|
* Added Verilog backend $dffsr supportClifford Wolf2015-03-181-1/+51
|
* Fixed "write_verilog -attr2comment" handling of "*/" in stringsClifford Wolf2015-02-131-2/+4
|
* Added dict/pool.sort()Clifford Wolf2015-01-241-0/+2
|
* Cosmetic changes in verilog output formatClifford Wolf2015-01-021-5/+10
|
* Replaced std::unordered_map as implementation for Yosys::dictClifford Wolf2014-12-261-25/+25
|
* Added Yosys::{dict,nodict,vector} container typesClifford Wolf2014-12-261-1/+1
|
* Added $dffe support to write_verilogClifford Wolf2014-12-201-3/+14
|
* Fixed generation of temp names in verilog backendClifford Wolf2014-11-071-4/+5
|
* Renamed SIZE() to GetSize() because of name collision on Win32Clifford Wolf2014-10-101-1/+1
|
* namespace YosysClifford Wolf2014-09-271-4/+3
|
* Various bug fixes (related to $macc model testing)Clifford Wolf2014-09-061-1/+2
|
* Removed $bu0 cell typeClifford Wolf2014-09-041-1/+0
|
* Using $pos models for $bu0Clifford Wolf2014-09-031-16/+1
|
* Changed backend-api from FILE to std::ostreamClifford Wolf2014-08-231-230/+230
|
* Fixed AOI/OAI expr handling in verilog backendClifford Wolf2014-08-161-4/+4
|
* Added additional gate types: $_NAND_ $_NOR_ $_XNOR_ $_AOI3_ $_OAI3_ $_AOI4_ ↵Clifford Wolf2014-08-161-4/+40
| | | | $_OAI4_
* Renamed $_INV_ cell type to $_NOT_Clifford Wolf2014-08-151-1/+1
|
* Refactoring of CellType classClifford Wolf2014-08-141-10/+28
|
* Be more conservative with printing decimal numbers in verilog backendClifford Wolf2014-08-021-2/+3
|
* Improved verilog output for ordinary $mux cellsClifford Wolf2014-08-021-3/+19
|
* More cleanups related to RTLIL::IdString usageClifford Wolf2014-08-021-6/+6
|
* Renamed port access function on RTLIL::Cell, added param access functionsClifford Wolf2014-07-311-40/+40
|
* Added support for "upto" wires to Verilog front- and back-endClifford Wolf2014-07-281-9/+22
|
* Using log_assert() instead of assert()Clifford Wolf2014-07-281-3/+2
|
* Refactoring: Renamed RTLIL::Design::modules to modules_Clifford Wolf2014-07-271-1/+1
|
* Refactoring: Renamed RTLIL::Module::cells to cells_Clifford Wolf2014-07-271-3/+3
|
* Refactoring: Renamed RTLIL::Module::wires to wires_Clifford Wolf2014-07-271-4/+4
|
* Added RTLIL::Cell::has(portname)Clifford Wolf2014-07-261-2/+2
|
* Manual fixes for new cell connections APIClifford Wolf2014-07-261-4/+4
|
* Changed users of cell->connections_ to the new API (sed command)Clifford Wolf2014-07-261-43/+43
| | | | | | | | | git grep -l 'connections_' | xargs sed -i -r -e ' s/(->|\.)connections_\["([^"]*)"\] = (.*);/\1set("\2", \3);/g; s/(->|\.)connections_\["([^"]*)"\]/\1get("\2")/g; s/(->|\.)connections_.at\("([^"]*)"\)/\1get("\2")/g; s/(->|\.)connections_.push_back/\1connect/g; s/(->|\.)connections_/\1connections()/g;'
* Renamed RTLIL::{Module,Cell}::connections to connections_Clifford Wolf2014-07-261-43/+43
|
* Various RTLIL::SigSpec related code cleanupsClifford Wolf2014-07-251-21/+29
|
* Removed RTLIL::SigSpec::optimize()Clifford Wolf2014-07-231-3/+0
|
* SigSpec refactoring: change RTLIL::SigSpec::chunks() to be read-only, ↵Clifford Wolf2014-07-221-2/+2
| | | | created interim RTLIL::SigSpec::chunks_rw()
* SigSpec refactoring: using the accessor functions everywhereClifford Wolf2014-07-221-29/+29
|
* SigSpec refactoring: renamed chunks and width to __chunks and __widthClifford Wolf2014-07-221-29/+29
|
* Use functions instead of always blocks for $mux/$pmux/$safe_pmux in verilog ↵Clifford Wolf2014-07-201-17/+21
| | | | backend
* Added support for $bu0 to verilog backendClifford Wolf2014-07-201-0/+16
|
* Added $slice and $concat cell typesClifford Wolf2014-02-071-0/+22
|
* Added support for non-const === and !== (for miter circuits)Clifford Wolf2013-12-271-6/+8
|
* Replaced signed_parameters API with CONST_FLAG_SIGNEDClifford Wolf2013-12-041-1/+1
|
* Replaced RTLIL::Const::str with generic decoder methodClifford Wolf2013-12-041-8/+11
|
// Set OS mouse position if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user) if (io.WantSetMousePos) { POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y }; ::ClientToScreen(g_hWnd, &pos); ::SetCursorPos(pos.x, pos.y); } // Set mouse position io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX); POINT pos; if (::GetActiveWindow() == g_hWnd && ::GetCursorPos(&pos)) if (::ScreenToClient(g_hWnd, &pos)) io.MousePos = ImVec2((float)pos.x, (float)pos.y); } void ImGui_ImplWin32_NewFrame() { ImGuiIO& io = ImGui::GetIO(); // Setup display size (every frame to accommodate for window resizing) RECT rect; ::GetClientRect(g_hWnd, &rect); io.DisplaySize = ImVec2((float)(rect.right - rect.left), (float)(rect.bottom - rect.top)); // Setup time step INT64 current_time; ::QueryPerformanceCounter((LARGE_INTEGER *)&current_time); io.DeltaTime = (float)(current_time - g_Time) / g_TicksPerSecond; g_Time = current_time; // Read keyboard modifiers inputs io.KeyCtrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; io.KeyShift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; io.KeyAlt = (::GetKeyState(VK_MENU) & 0x8000) != 0; io.KeySuper = false; // io.KeysDown[], io.MousePos, io.MouseDown[], io.MouseWheel: filled by the WndProc handler below. // Update OS mouse position ImGui_ImplWin32_UpdateMousePos(); // Update OS mouse cursor with the cursor requested by imgui ImGuiMouseCursor mouse_cursor = io.MouseDrawCursor ? ImGuiMouseCursor_None : ImGui::GetMouseCursor(); if (g_LastMouseCursor != mouse_cursor) { g_LastMouseCursor = mouse_cursor; ImGui_ImplWin32_UpdateMouseCursor(); } } // Allow compilation with old Windows SDK. MinGW doesn't have default _WIN32_WINNT/WINVER versions. #ifndef WM_MOUSEHWHEEL #define WM_MOUSEHWHEEL 0x020E #endif // Process Win32 mouse/keyboard inputs. // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application. // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application. // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. // PS: In this Win32 handler, we use the capture API (GetCapture/SetCapture/ReleaseCapture) to be able to read mouse coordinations when dragging mouse outside of our window bounds. // PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag. IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (ImGui::GetCurrentContext() == NULL) return 0; ImGuiIO& io = ImGui::GetIO(); switch (msg) { case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK: case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK: case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK: { int button = 0; if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) button = 0; if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) button = 1; if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) button = 2; if (!ImGui::IsAnyMouseDown() && ::GetCapture() == NULL) ::SetCapture(hwnd); io.MouseDown[button] = true; return 0; } case WM_LBUTTONUP: case WM_RBUTTONUP: case WM_MBUTTONUP: { int button = 0; if (msg == WM_LBUTTONUP) button = 0; if (msg == WM_RBUTTONUP) button = 1; if (msg == WM_MBUTTONUP) button = 2; io.MouseDown[button] = false; if (!ImGui::IsAnyMouseDown() && ::GetCapture() == hwnd) ::ReleaseCapture(); return 0; } case WM_MOUSEWHEEL: io.MouseWheel += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA; return 0; case WM_MOUSEHWHEEL: io.MouseWheelH += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA; return 0; case WM_KEYDOWN: case WM_SYSKEYDOWN: if (wParam < 256) io.KeysDown[wParam] = 1; return 0; case WM_KEYUP: case WM_SYSKEYUP: if (wParam < 256) io.KeysDown[wParam] = 0; return 0; case WM_CHAR: // You can also use ToAscii()+GetKeyboardState() to retrieve characters. if (wParam > 0 && wParam < 0x10000) io.AddInputCharacter((unsigned short)wParam); return 0; case WM_SETCURSOR: if (LOWORD(lParam) == HTCLIENT && ImGui_ImplWin32_UpdateMouseCursor()) return 1; return 0; } return 0; }