content update

This commit is contained in:
Lieuwe Leene 2021-09-19 13:41:50 +02:00
parent 971ff67b26
commit 1c7d6955da
10 changed files with 286 additions and 41 deletions

View File

@ -49,15 +49,11 @@ themeColor = "#494f5c"
name = "About"
url = "about/"
weight = 16
[[menu.main]]
name = "Posts"
url = "posts/"
weight = 16
[[menu.main]]
name = "Projects"
url = "projects/"
weight = 16
[[menu.main]]
name = "Links"
url = "links/"
name = "Posts"
url = "posts/"
weight = 16

View File

@ -2,18 +2,21 @@
title: "Hello friend 🐱‍👤"
date: 2021-08-23T17:52:07+02:00
draft: false
tags:
- about
- config
---
## About This Site
This site shares a bit of informal documentation and more blog-based recod
This site shares a bit of informal documentation and more blog-based record
keeping. Providing commentary on design decisions should be just as useful as
some of the technical documentation however included in my repositories.
## My Setup
I mainly use RHEL flavours of linux having both CentOS and Fedora machines. Most
hosted services run on CentOS 8 at the moment abiet they are approaching
hosted services run on CentOS 8 at the moment albeit they are approaching
end-of-life. Overall the package repository for CentOS 7/8 is just right. I
rarely need to compile anything from source and packages are very stable.
I will eventually migrate to Fedora completely which is where I operate my
@ -21,7 +24,7 @@ development environment.
This is a list of my most used self-hosted services:
- Gitea: Git server with web interface for repository mirrors and personal repos
- Plex: mutlti-media hosting service for streaming movies and tv-shows
- Plex: multi-media hosting service for streaming movies and tv-shows
- NextCloud: Cloud storage for synchronizing and sharing files
- Cockpit: Web base administration portal managing linux boxes
- RoundCube: Web based email client
@ -31,20 +34,12 @@ This is a list of my most used self-hosted services:
There are several others that I have tried but these really have been the things
I relied on the most in the past 5 years or so. I think the only thing that is
possibly missing from this list is possibly the equivilent of a centralized LDAP
possibly missing from this list is possibly the equivalent of a centralized LDAP
service but I simply haven't had to manage more than handful of users.
Currently I develop quite a bit of python utilities for scraping, labeling, and
Currently I develop quite a bit of python utilities for scraping, labelling, and
managing media in an automated fashion. In part I am preparing data for one of
my long term projects which is related to image classification based on
structural decomposition rather than textural features. The main idea here is
to analyse and extract structure in an image before performing in-depth analysis
such that said analysis is most specific to its context.
This is some of the hardware that I use:
- W10 Laptop: Intel i5-7200U CPU with 8 GB of memory
- W10 Desktop: Intel i5-7200U CPU with 8 GB of memory
## About Me
I do mixed signal circuit design and a bit of software development as a hobby.

View File

@ -1,7 +1,7 @@
---
title: "Links"
date: 2021-08-29T12:35:51+02:00
draft: false
draft: true
---
## Not Fun

View File

@ -16,7 +16,7 @@ SVG is generally the image container of choice having used it for illustrations,
chip or device specifications, and visual outputs generated by code. SVG is
plain xml that is structured with some top level object/properties followed by
standardized objects that draw lines and shapes.
The hope here is that we can call a predefined go proceedure that parses
The hope here is that we can call a predefined go procedure that parses
some section of markdown source code and instantiates the corresponding svg file
under our static folder that is then referenced.
@ -33,7 +33,7 @@ statements.
### Build Instructions
Building `libfms` and `kgt` from source was not too much of a hassle although
the build / dependancy documentation could be better. This was build with my
the build / dependency documentation could be better. This was build with my
WLS-Ubuntu environment.
``` bash

168
content/posts/calibre.md Normal file
View File

@ -0,0 +1,168 @@
---
title: "Calibre Physical Verification Hacks"
date: 2021-09-14T11:30:11+02:00
draft: true
tags:
- calibre
- config
- verification
---
This is a list of 'modifications' to the standard Calibre verification flow I
have used in the past to either modify the checks performed by Calibre or input
data bases.
# DRC
## Extended Device Checks
```tvf
NVA0.VAR_OVLP { @ Varactors / Tiles should not overlap
VARi AND > 1
}
```
```tvf
NVA1.Cu_PPI.TEAR { @ Shape of Cu_PP I pad (under PM2 area): tear shape required
X0 = EXT Cu_PPIi <1 ABUT <125 INTERSECTING ONLY REGION
X1 = EXT Cu_PPIi <1 ABUT <180 INTERSECTING ONLY REGION
X2 = INT Cu_PPIi <1 ABUT <180 INTERSECTING ONLY REGION
X3 = EXPAND EDGE (X1 NOT TOUCH INSIDE EDGE X0) BY 1 EXTEND BY 50
X4 = EXPAND EDGE (X2 NOT TOUCH INSIDE EDGE X0) BY 1 EXTEND BY 50
(X3 AND X0) OR (X4 AND X0)
}
```
## Layer / Device Aliasing
```tvf
LAYER MAP 107 DATATYPE 0 746
```
# LVS
## Adding New Device Primitives
```tvf
LAYER RESLYR 450
LAYER MAP 215 DATATYPE 21 450 // layer to form memresistor
XTERM = RESLYR AND M4
XCDTR = RESLYR NOT M4
CONNECT metal4 MEMRESLYRT
DEVICE XDEVICE XCDTR XTERM(PORT1) XTERM(PORT2) netlist model xdevice
```
```spice
.SUBCKT xdevice PORT1 PORT2
.ENDS
```
```lisp
(xdevice
(DEVICE_LIB DEVICE_CELL DEVICE_VIEW)
(
(PORT1 PIN1)
(PORT2 PIN2)
)
(
(nil multi 1)
(nil m 1)
)
)
```
## Extending Connectivity Layers
```tvf
LAYER PM1i 5001
LAYER MAP 5 DATATYPE 1 5001
LAYER Cu_PPIi 7410
LAYER MAP 74 DATATYPE 10 7410
LAYER UBM 170
LAYER MAP 170 DATATYPE 0 170
LAYER PM2i 5002
LAYER MAP 5 DATATYPE 2 5002
VIA8 = COPY CB2
metal9 = COPY Cu_PPIi
VIA9 = COPY PM2i
metal10 = COPY UBM
CONNECT metal9 metal8 BY VIA8
CONNECT metal10 metal9 BY VIA9
TEXT LAYER 140 ATTACH 140 metal9
PORT LAYER TEXT 140
TEXT LAYER 141 ATTACH 141 metal10
PORT LAYER TEXT 141
TEXT LAYER 125 ATTACH 125 metal10
PORT LAYER TEXT 125
```
## Hot fixing LVS comparison
```tvf
LVS SPICE CULL PRIMITIVE SUBCIRCUITS YES
VIRTUAL CONNECT NAME "POWER"
TEXT "POWER" LOCX LOCY DATATYPE
LAYOUT RENAME TEXT "/DATA\\[(.*)\\]/DATA<-1>/M-"
```
# SPICE
## Port Order Reshuffling
```bash
function getSortedOrder() {
local SOURCE=""
local SORTED=""
read -a SOURCE <<< "$1"
SORTED="${SOURCE[@]}"
if [ -z "${SORTED//*\[*}" ] ; then
SORTED=($(echo "${SOURCE[@]:2}" | tr " " "\n" | sed -r "s/\[([0-9]+)\]/ \1 /g" \
| sort -k 1,1 -k2,2nr | sed -r "s/ ([0-9]+) /\[\1\]/g" ))
else
SORTED=($(echo "${SOURCE[@]:2}" | tr " " "\n" | sed -r "s/<([0-9]+)>/ \1 /g" \
| sort -k 1,1 -k2,2nr | sed -r "s/ ([0-9]+) /<\1>/g" ))
fi
echo "${SOURCE[@]:0:2} ${SORTED[@]}"
}
function updatePortOrder() {
local TARGET="$1"
local CDL_FILE="$2"
local PORTORDER="$(awk -v target="subckt ${TARGET} " -f "catch.awk" "$CDL_FILE")"
local PORTREF=$(getSortedOrder "$PORTORDER")
local SWPDELIMITER=""
echo $TARGET
if [ -z "${PORTREF//*\[*}" ] ; then SWPDELIMITER="TRUE" ; fi
awk -v target="subckt ${TARGET} " -v release="$PORTREF" -v swpdelim="$SWPDELIMITER" \
-f "release.awk" "$CDL_FILE" > "${TARGET}.cdl"
[ ! -z "$(grep -m 1 "\[" "${TARGET}.cdl")" ] && [ ! -z "$(grep -m 1 "<" "${TARGET}.cdl")" ] \
&& echo "Error $CDL_FILE uses mixed delimiters"
}
```
```awk
BEGIN{ hold = ""; IGNORECASE = 1 }
NF {
if( $1 == "+" && hold != "")
{ for(i=2;i<=NF;i++) hold=hold " " $i }
else if( hold != "") { print hold; hold=""; exit }
};
$0 ~ target { hold = $0 };
```
```awk
BEGIN{output="";hold="";IGNORECASE=1};
NF{if($1!="+")hold=""}
$0~target{
hold=$0
n=split(release,ports," ")
for(i=n;i>0;i--){
if(swpdelim!=""){
gsub("<","[",ports[i])
gsub(">","]",ports[i])}
output=ports[i]" "output}
print output}
NF{if(hold=="")print $0}
```

View File

@ -1,11 +1,10 @@
---
title: "Mile Stones"
title: "Mile Stones 📚"
date: 2021-08-28T16:13:52+02:00
draft: false
tags:
- website
- content
- plan
- ideas
---
This is a list of topics that I may include at some point in time:
@ -17,7 +16,7 @@ This is a list of topics that I may include at some point in time:
I also want to share some of the IC design work building up a technical profile:
1. Chip gallery
2. Acedemic topics
2. Academic topics
3. ADC stuff
4. Time domain processing
5. Skill and Cadence utilities

82
content/posts/pyside.md Normal file
View File

@ -0,0 +1,82 @@
---
title: "Binding QML with Python: PyViewer"
date: 2021-08-29T12:53:19+02:00
draft: false
tags:
- python
- qml
- gui
- code
---
[PyViewer](https://git.leene.dev/lieuwe/pyviewer) is a example project which
implements a simple image browser / viewer in a scrollable grid array. This main
objective here was using QML to define a graphical layout and bind it to a
python code-base. Note that this code base is compatible with both Pyside2 and
Pyside6. This is because while Pyside6 is preferred it is not readily available
on all platforms. Running Pyside6 instead only recommend the qml library version
requirements to omitted.
Please take a look at the git repository for exact implementation details. A
brief summary of this interaction is presented below.
## Emitting QML Calls
Creating a `QObject` and adding `PySide2.QtCore.Slot` decorators to its methods
will allow a python object to be added to the qml context as a referenceable
object. For example here we add "viewer" to the qml context which is a
"PyViewer" python object.
```Python
pyviewer = PyViewer()
engine.rootContext().setContextProperty("viewer", pyviewer)
```
This way we can call the object's python procedure "update_tag_filter" from
within the QML script as follows:
```QML
viewer.update_tag_filter(false);
```
Further using the `PySide2.QtCore.Property` decorator further allows us to call
states in our python object and manipulate them as it were a qml object.
```QML
viewer.path.split("::")
```
## Emitting Python Calls
Once this context is working we can create a `PySide2.QtCore.Signal` object to
call QML methods from within the python context. A python procedure could then
"emit" this signal and thereby prompt any connected qml methods.
```python
self.path_changed.emit()
```
In the qml contect we can connect the signals from the python "viewer" object
to a qml function call "swipe.update_paths" for example.
```qml
viewer.path_changed.connect(swipe.update_paths)
```
## Downside
Debugging and designing QML in this environment is limited since the pyside
python library does not support all available QML/QT6 functionality. In most
cases you are looking at C++ Qt documentation for how the pyside data-types
and methods are supposed to behave without good hinting.
Also the variety in data types that can be passed from one context to the other
is constrained although in this case I was able to manage with strings and byte
objects.
## Other Notes: TODO
```python
ImageCms.profileToProfile(img, 'USWebCoatedSWOP.icc',
'sRGB Color Space Profile.icm', renderingIntent=0, outputMode='RGB')
```

View File

@ -1,16 +1,16 @@
---
title: "Setting up a new site."
title: "Setting Up a New Site 🌃"
date: 2021-08-24T10:24:27+02:00
draft: false
toc: true
tags:
- website
- setup
- config
- hugo
- git-filter
- git
---
Previously I tried using grav with the intention to serve a simple website as
Previously I tried using Grav with the intention to serve a simple website as
it is quite easy to setup and the interface seemed quite nice. However the
editing environment didn't feel good and after googling around a bit hugo
already seemed a lot more appealing. It renders from markdown with some html/css
@ -33,14 +33,14 @@ cd hugo
go install
```
I started off with the hermit theme and initialized a repository for this site
and the theme to track changes separately. I will probably adjust the color and
and the theme to track changes separately. I will probably adjust the colour and
type-setting to some extent. Then eventually adjusting the actual layouts and
templates as we go.
## Git filter
Currently I setup two branches: `master` which is deployed statically on
leene.dev, and `dev` which is just for local development as I try out different
`leene.dev`, and `dev` which is just for local development as I try out different
things. I setup a clean-smudge git filter to manage deployment on a site-basis:
``` toml

View File

@ -1,8 +0,0 @@
---
title: "Pyside"
date: 2021-08-29T12:53:19+02:00
draft: false
---
Notes on using pyside to bind python with qml.

View File

@ -0,0 +1,13 @@
---
title: "Super Resolution 🧙‍♂️"
date: 2021-09-19T13:30:00+02:00
draft: true
tags:
- upscaling
- image-processing
- anime
- python
---
WIP: this is an on going effort for super-resolving images given learned context
and Super-Resolution Using a Generative Adversarial Network (SRGAN).