Skip to content

Commit

Permalink
make: Use locks separate from sentinels to avoid early file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsc96 committed Nov 20, 2024
1 parent 9e5cc9b commit 1fc09f2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cheshire.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,29 @@ $(CHS_ROOT)/hw/regs/cheshire_reg_pkg.sv $(CHS_ROOT)/hw/regs/cheshire_reg_top.sv:
CLINTCORES ?= 1
include $(CLINTROOT)/clint.mk
$(CLINTROOT)/.generated:
flock -x $@ $(CHS_SMAKE) CLINTCORES=$(CLINTCORES) clint && touch $@
flock -x $@.lock $(CHS_SMAKE) CLINTCORES=$(CLINTCORES) clint && touch $@

# OpenTitan peripherals
include $(OTPROOT)/otp.mk
$(OTPROOT)/.generated: $(CHS_ROOT)/hw/rv_plic.cfg.hjson
flock -x $@ sh -c "cp $< $(dir $@)/src/rv_plic/; $(CHS_SMAKE) -j1 otp" && touch $@
flock -x $@.lock sh -c "cp $< $(dir $@)/src/rv_plic/; $(CHS_SMAKE) -j1 otp" && touch $@

# AXI RT
AXIRT_NUM_MGRS ?= 6
AXIRT_NUM_SUBS ?= 2
include $(AXIRTROOT)/axirt.mk
$(AXIRTROOT)/.generated:
flock -x $@ $(CHS_SMAKE) AXIRT_NUM_MGRS=$(AXIRT_NUM_MGRS) AXIRT_NUM_SUBS=$(AXIRT_NUM_SUBS) axirt_regs && touch $@
flock -x $@.lock $(CHS_SMAKE) AXIRT_NUM_MGRS=$(AXIRT_NUM_MGRS) AXIRT_NUM_SUBS=$(AXIRT_NUM_SUBS) axirt_regs && touch $@

# AXI VGA
include $(AXI_VGA_ROOT)/axi_vga.mk
$(AXI_VGA_ROOT)/.generated:
flock -x $@ $(CHS_SMAKE) axi_vga && touch $@
flock -x $@.lock $(CHS_SMAKE) axi_vga && touch $@

# Custom serial link
$(CHS_SLINK_DIR)/.generated: $(CHS_ROOT)/hw/serial_link.hjson
cp $< $(dir $@)/src/regs/serial_link_single_channel.hjson
flock -x $@ $(CHS_SMAKE) -C $(CHS_SLINK_DIR) update-regs && touch $@
flock -x $@.lock $(CHS_SMAKE) -C $(CHS_SLINK_DIR) update-regs && touch $@

# iDMA
include $(IDMA_ROOT)/idma.mk
Expand Down

0 comments on commit 1fc09f2

Please sign in to comment.