Commit Graph

5485 Commits

Author SHA1 Message Date
Jannis Harder d9b5bf65e8 glucose2: Don't try to justify toplevel assignments
Doing so isn't necessary and would occasionally result in violated
assertions within glucose2.
2024-09-07 13:16:20 +02:00
Jannis Harder d1aa15b0c8 glucose2: Create initial extra jlevel entries
My understanding is that jlevel needs to have this extra space as there
is existing code that assumes it is safe to index into it at index
decisionLevel()+1.
2024-08-19 14:15:49 +02:00
Jannis Harder 1e02c4327c glucose2: Allow user defined marking of limited depth cones
This does require using the version of uncheckedEnqueue that does check
whether the target lit is active in the current round.
2024-08-19 14:06:17 +02:00
Jannis Harder f36e35f735 glucose2: Improvements and fixes for proof tracing
This fills some gaps and fixes a few edge cases with the new proof
tracing callback API.
2024-08-19 13:47:53 +02:00
Jannis Harder e2749d5c90 glucose2: Allow re-definition of gates
This enables e.g. rewriting the circuit based on discovered
equivalences.

This avoids re-introducing doubly linked lists for the fanout by instead
keeping a vector of variables whose fanout lists contain gate inputs
that were changed to a different literal. The first time propagation
runs with that vector nonempty, it deduplicates that vector and then
traverses the affected lists and moves every changed gate input into the
correct list.
2024-08-19 13:45:19 +02:00
Jannis Harder b7ea0adc9f glucose2: Add option to include inner gates in the justification model 2024-08-19 13:38:14 +02:00
Jannis Harder a6512064bc First version of glucose2 proof tracing API 2024-08-05 12:02:16 +02:00
Emil J 28d955ca97
Merge pull request #35 from lf-/jade/fix-gitarchive
Fix archive reproducibility
2024-07-08 19:02:21 +02:00
Jade Lovelace 04f50406fd Fix archive reproducibility
The git archive export-subst option does not have consistent results
over time, since the abbreviated commit hash can get longer over time.

Instead, let's export the full commit hash.

This was found in an audit of source archive reproducibility in nixpkgs:

```
~ » expected=$(nix-store -r /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source)
actual=$(nix-prefetch-url --print-path --unpack --name source 896e5e7ded.tar.gz | tail -n1)
nix-shell -p diffoscope --run "diffoscope $expected $actual"
this path will be fetched (3.77 MiB download, 34.50 MiB unpacked):
  /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source
copying path '/nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source' from 'https://cache.nixos.org'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
--- /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source
+++ /nix/store/v7ms5ghibzi8pk71nzlhvsbn7a0rdpy7-source
│   --- /nix/store/4j9rj4m6akjskp0f7k923qff817k6hv5-source/.gitcommit
├── +++ /nix/store/v7ms5ghibzi8pk71nzlhvsbn7a0rdpy7-source/.gitcommit
│ @@ -1 +1 @@
│ -896e5e7de
│ +896e5e7ded
│ ├── stat {}
│ │ @@ -1,7 +1,7 @@
│ │
│ │ -  Size: 10        	Blocks: 1          IO Block: 512    regular file
│ │ +  Size: 11        	Blocks: 1          IO Block: 512    regular file
│ │  Device: 0,24	Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
│ │
│ │  Modify: 1970-01-01 00:00:01.000000000 +0000
```
2024-06-27 13:41:10 -07:00
William D. Jones 237d81397f Modify include guards in cmd.c so that Windows compilers don't compile Unix-only code. 2024-05-08 08:26:54 +02:00
Martin Povišer 03da96f12f Patch for lack of `system` on WASM 2024-04-23 13:49:12 +02:00
Martin Povišer b502f00222 Fix prototype mismatch for `Gia_ManSimRsb` 2024-04-22 17:39:32 +02:00
Martin Povišer 208b48667f Merge branch 'master' of https://github.com/berkeley-abc/abc into yosys-experimental 2024-04-22 16:33:29 +02:00
Roland Coeurjoly 2c52e3f969 Support out of tree builds 2024-04-18 04:49:09 +01:00
alanminko 8a174ee865
Merge pull request #287 from gadfort/correct-prefix
ensure initial library writing also honors prefix
2024-04-16 06:22:46 -07:00
Peter Gadfort de060a26ad ensure initial library writing also honors prefix 2024-04-16 08:58:28 -04:00
Alan Mishchenko bc725b85de Bug fix in CNF generation for &glucose (three more places). 2024-04-15 20:29:38 -07:00
Alan Mishchenko 2d6b5c9adc Bug fix in CNF generation for &glucose. 2024-04-15 20:25:43 -07:00
Alan Mishchenko 99e0e37da6 Added switch -p in "read_lib" to skip writing cell prefix. 2024-04-14 09:51:00 -07:00
alanminko 682480e5e9
Merge pull request #285 from gadfort/add-lib-merging
add library merging flag to read_lib
2024-04-14 09:39:14 -07:00
Peter Gadfort 935c6a875d add missing flag to read_lib help 2024-04-12 13:49:44 -04:00
Peter Gadfort 1d90cafd54 add library merging flag to read_lib
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
2024-04-12 13:27:58 -04:00
alanminko b10d000c7a
Merge pull request #284 from aletempiac/acd66
LUT structure mapping
2024-04-11 12:05:12 -07:00
aletempiac 045803dcb8 Merge remote-tracking branch 'origin/master' into acd66 2024-04-11 19:02:29 +02:00
aletempiac 0c905f873b Fixes 2024-04-11 19:01:05 +02:00
aletempiac 6052d10fde Adding new command if -U for 2-LUT decompositions under delay profile 2024-04-11 15:45:37 +02:00
aletempiac e8924e5534 Fixes and improvements 2024-04-11 15:44:52 +02:00
aletempiac 5b49724fcc removing acd666 2024-04-11 15:43:22 +02:00
Miodrag Milanović 1446b7549f
Merge pull request #29 from thorpej/dev/pkgsrc-patch-NetBSD-1
Fix building on NetBSD
2024-04-11 14:48:28 +02:00
N. Engelhardt 078afe9faa
Merge pull request #31 from davidar/fix-55
Fix Assertion using &if: `pCutSet->nCuts > 0'
2024-04-11 14:41:43 +02:00
N. Engelhardt ccc02c4400
Merge pull request #30 from povik/&mfs-fixes
Address some `&mfs` crashes
2024-04-11 14:41:24 +02:00
Alan Mishchenko ca78f5e6e5 Bug fix in the resub engine. 2024-04-11 05:05:52 -07:00
aletempiac 32bc1d4ab2 Cleaning and generalizing code 2024-04-11 11:31:28 +02:00
aletempiac 64fea5c4c2 Improving the performance and quality of acd66 2024-04-10 18:43:52 +02:00
aletempiac 6b5ebb3e76 Removing assertion when decomposing into LUTs smaller than 6 2024-04-10 18:42:52 +02:00
aletempiac 8f3447800c Support again decompositions into luts smaller than 6 2024-04-02 11:25:03 +02:00
David A Roberts accf50468a Apply patch to If_ObjPerformMappingChoice too 2024-04-01 10:03:10 +10:00
David A Roberts 316eec6d3f Fix Assertion using &if: `pCutSet->nCuts > 0' 2024-04-01 09:40:41 +10:00
Alan Mishchenko 6e1653426f Switch to randomly select one choice. 2024-03-28 16:22:06 +08:00
Alan Mishchenko a2cb5eb4e3 Adding command &pms to print miter status. 2024-03-25 23:39:03 +08:00
aletempiac 1f72ffce79 Improving ACD performance with bail-out conditions 2024-03-25 14:23:43 +01:00
Alan Mishchenko b0d2ff1c63 Exact synthesis using NAND-gates. 2024-03-24 00:10:08 +09:00
Martin Povišer 1107634fa6 &mfs: Make it no biggie when a network is all blackboxes, no whiteboxes 2024-03-22 22:47:40 +01:00
Martin Povišer d7fc8fe98f &mfs: Handle blackboxes robustly
When the network is being handed over to the "sfm" core, all blackboxes
are modeled by inserting new PIs, POs, and those being connected by
buffers to the nodes representing the CIs, COs. Make two changes:

 * Robustly deny the fake PIs from being considered when shopping for
   LUT fanin substitutions. Such reconnection occurring would trip up
   the code reintegrating the result.

 * Make sure the buffer connecting the fake-PO to the CO doesn't get
   rewritten as part of the `mfs` transformation, and extend this
   protection to any whitebox models.
2024-03-22 22:43:08 +01:00
Martin Povišer fda490235e &mfs: Fix issues with traversal when re-importing network
The former implementation of `Sfm_NtkDfs` was trying to serialize the
network while ordering all box inputs ahead of the box outputs. This is
sometimes impossible, leaving the result unordered, which led to crashes
in the `&mfs` code when it was reintegrating the result into the GIA
structure:

  ABC: Assertion failed: iLitNew >= 0 (src/aig/gia/giaMfs.c: Gia_ManInsertMfs: 388)

With a small change to `Gia_ManInsertMfs` which does the reintegration
we don't really need the ordering to see through boxes, ordering on the
paths between boxes is sufficient. Relaxing the ordering requirement, we
make `Sfm_NtkDfs` robust.
2024-03-22 22:01:45 +01:00
Martin Povišer b83985c25b Add `&mfs -r` for re-import testing 2024-03-22 21:42:12 +01:00
aletempiac 6aacf524aa Performance improvement and fixes 2024-03-22 19:19:35 +01:00
aletempiac 8a314db8dc Bug fix 2024-03-22 15:39:52 +01:00
Alan Mishchenko 783a5404a2 Fixing Windows makefile. 2024-03-19 09:57:52 +09:00
Alan Mishchenko 2c0943ff62 Fixiing compiler problem on Windows. 2024-03-19 09:34:20 +09:00