Last edited by arcachofo on Fri Dec 24, 2021 3:11 am; edited 1 time in total (Reason for editing : Marked as solved (green color))
Last edited by arcachofo on Fri Dec 24, 2021 3:11 am; edited 1 time in total (Reason for editing : Marked as solved (green color))
arcachofo wrote:Hi.
Which version are using for these tests?
In the picture, that buffer is working correctly.
Output Enable is active low as shown in the pin (it has a circle).
It should disable the output by setting OE pin high.
Is this working correctly?
that will work as a subcircuit! thanks a lot!!!arcachofo wrote:
By now there is no way to configue this.
You should do it outside the buffer, adding an inverter like this:
arcachofo wrote:
This is a critical problem, I will release 0.4.15-SR1 in a few days, one week at most.
Yes, it is critical, this is not about buffers, it breaks the simulation in many cases.if it is not so big,
Source code with this and a bunch other bugs fixed:could you post affected source code lines? I will patch it myself.
arcachofo wrote:Yes, it is critical, this is not about buffers, it breaks the simulation in many cases.if it is not so big,
Source code with this and a bunch other bugs fixed:could you post affected source code lines? I will patch it myself.
https://code.launchpad.net/~arcachofo/simulide/simulide_0.4.14
diff -Naur orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/circuitview.cpp simulide_0.4.15-Final_Sources/src/gui/circuitwidget/circuitview.cpp
--- orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/circuitview.cpp 2020-12-22 02:54:30.000000000 -0600
+++ simulide_0.4.15-Final_Sources/src/gui/circuitwidget/circuitview.cpp 2021-04-05 21:48:34.134079661 -0500
@@ -30,7 +30,8 @@
#include "utils.h"
CircuitView* CircuitView::m_pSelf = 0l;
-
+#define VP_WIDTH 6400
+#define VP_HEIGHT 2400
CircuitView::CircuitView( QWidget *parent )
: QGraphicsView( parent )
{
@@ -45,7 +46,7 @@
//clear();
- viewport()->setFixedSize( 3200, 2400 );
+ viewport()->setFixedSize( VP_WIDTH, VP_HEIGHT );
bool scrollBars = MainWindow::self()->settings()->value( "Circuit/showScroll" ).toBool();
if( scrollBars )
{
@@ -139,7 +140,7 @@
m_enterItem = 0l;
m_scale = 1;
- m_circuit = new Circuit( -1600, -1200, 3200, 2400, this );
+ m_circuit = new Circuit( -(VP_WIDTH/2), -(VP_HEIGHT/2), VP_WIDTH, VP_HEIGHT, this );
setScene( m_circuit );
centerOn( 900, 600 );
//setCircTime( 0 );
@@ -329,8 +330,8 @@
QSvgGenerator svgGen;
svgGen.setFileName( fileName );
- svgGen.setSize( QSize(3200, 2400) );
- svgGen.setViewBox( QRect(0, 0, 3200, 2400) );
+ svgGen.setSize( QSize(VP_WIDTH, VP_HEIGHT) );
+ svgGen.setViewBox( QRect(0, 0, VP_WIDTH, VP_HEIGHT) );
svgGen.setTitle( tr("Circuit Name") );
svgGen.setDescription( tr("Generated by SimulIDE") );
diff -Naur orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/components/logic/buffer.cpp simulide_0.4.15-Final_Sources/src/gui/circuitwidget/components/logic/buffer.cpp
--- orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/components/logic/buffer.cpp 2019-08-05 11:43:54.000000000 -0500
+++ simulide_0.4.15-Final_Sources/src/gui/circuitwidget/components/logic/buffer.cpp 2021-04-06 16:25:12.777282716 -0500
@@ -55,7 +55,9 @@
if( m_outEnPin->isConnected() )
{
m_outEnPin->reset();
- m_outEnPin->connector()->remove();
+ if (m_outEnPin->connector()) {
+ m_outEnPin->connector()->remove();
+ }
}
}
m_outEnPin->setVisible( t );
@@ -66,7 +68,11 @@
void Buffer::remove()
{
if( m_tristate )
- if( m_outEnPin->isConnected() ) m_outEnPin->connector()->remove();
+ if( m_outEnPin->isConnected() ) {
+ if (m_outEnPin->connector()) {
+ m_outEnPin->connector()->remove();
+ }
+ }
Gate::remove();
}
diff -Naur orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/node.cpp simulide_0.4.15-Final_Sources/src/gui/circuitwidget/node.cpp
--- orig_sources/simulide_0.4.15-Final_Sources/src/gui/circuitwidget/node.cpp 2021-03-22 13:04:12.000000000 -0600
+++ simulide_0.4.15-Final_Sources/src/gui/circuitwidget/node.cpp 2021-04-06 16:23:04.261635441 -0500
@@ -89,7 +89,11 @@
if( conectors == 2 ) joinConns( con[0], con[1] ); // 2 Conn
else // 1 Conn
{
- if( m_pin[con[0]]->isConnected() ) m_pin[con[0]]->connector()->remove();
+ if( m_pin[con[0]]->isConnected() ) {
+ if (m_pin[con[0]]->connector()) {
+ m_pin[con[0]]->connector()->remove();
+ }
+ }
}
Circuit::self()->compList()->removeOne( this );
Thanks, I will apply those changes.nulik wrote:btw, I fixed null pointer crash in buffer.cpp and moved view port boundaries to constants so you can create larger circuits. Feel free to include if you consider it important:
Similar topics
Permissions in this forum:
You cannot reply to topics in this forum