Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
artiq_experiments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
artiq_experiments
Commits
88e8aa55
Commit
88e8aa55
authored
Jul 14, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test de edgecounter cabeza
parent
caa5e79a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
256 additions
and
0 deletions
+256
-0
device_db_withedgecounter.py
artiq_master/repository/device_db_withedgecounter.py
+237
-0
pmt_count.py
artiq_master/repository/pmt_count.py
+19
-0
No files found.
artiq_master/repository/device_db_withedgecounter.py
0 → 100644
View file @
88e8aa55
#autogenerated for the liaf variant
core_addr
=
"192.168.1.75"
device_db
=
{
"core"
:
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.core"
,
"class"
:
"Core"
,
"arguments"
:
{
"host"
:
core_addr
,
"ref_period"
:
1e-09
}
},
"core_log"
:
{
"type"
:
"controller"
,
"host"
:
"::1"
,
"port"
:
1068
,
"command"
:
"aqctl_corelog -p {port} --bind {bind} "
+
core_addr
},
"core_cache"
:
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.cache"
,
"class"
:
"CoreCache"
},
"core_dma"
:
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.dma"
,
"class"
:
"CoreDMA"
},
"i2c_switch0"
:
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.i2c"
,
"class"
:
"PCA9548"
,
"arguments"
:
{
"address"
:
0xe0
}
},
"i2c_switch1"
:
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.i2c"
,
"class"
:
"PCA9548"
,
"arguments"
:
{
"address"
:
0xe2
}
},
}
# standalone peripherals
device_db
[
"ttl0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLInOut"
,
"arguments"
:
{
"channel"
:
0x000000
},
}
device_db
[
"ttl1"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLInOut"
,
"arguments"
:
{
"channel"
:
0x000001
},
}
device_db
[
"ttl2"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLInOut"
,
"arguments"
:
{
"channel"
:
0x000002
},
}
device_db
[
"ttl3"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLInOut"
,
"arguments"
:
{
"channel"
:
0x000003
},
}
device_db
[
"ttl4"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x000004
},
}
device_db
[
"ttl4_counter"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.edge_counter"
,
"class"
:
"EdgeCounter"
,
"arguments"
:
{
"channel"
:
0x000004
},
}
device_db
[
"ttl5"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x000005
},
}
device_db
[
"ttl6"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x000006
},
}
device_db
[
"ttl7"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x000007
},
}
device_db
[
"eeprom_urukul0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.kasli_i2c"
,
"class"
:
"KasliEEPROM"
,
"arguments"
:
{
"port"
:
"EEM1"
}
}
device_db
[
"spi_urukul0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.spi2"
,
"class"
:
"SPIMaster"
,
"arguments"
:
{
"channel"
:
0x000008
}
}
device_db
[
"ttl_urukul0_io_update"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x000009
}
}
device_db
[
"ttl_urukul0_sw0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000a
}
}
device_db
[
"ttl_urukul0_sw1"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000b
}
}
device_db
[
"ttl_urukul0_sw2"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000c
}
}
device_db
[
"ttl_urukul0_sw3"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000d
}
}
device_db
[
"urukul0_cpld"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.urukul"
,
"class"
:
"CPLD"
,
"arguments"
:
{
"spi_device"
:
"spi_urukul0"
,
"sync_device"
:
None
,
"io_update_device"
:
"ttl_urukul0_io_update"
,
"refclk"
:
125000000.0
,
"clk_sel"
:
2
}
}
device_db
[
"urukul0_ch0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ad9910"
,
"class"
:
"AD9910"
,
"arguments"
:
{
"pll_n"
:
32
,
"chip_select"
:
4
,
"cpld_device"
:
"urukul0_cpld"
,
"sw_device"
:
"ttl_urukul0_sw0"
}
}
device_db
[
"urukul0_ch1"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ad9910"
,
"class"
:
"AD9910"
,
"arguments"
:
{
"pll_n"
:
32
,
"chip_select"
:
5
,
"cpld_device"
:
"urukul0_cpld"
,
"sw_device"
:
"ttl_urukul0_sw1"
}
}
device_db
[
"urukul0_ch2"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ad9910"
,
"class"
:
"AD9910"
,
"arguments"
:
{
"pll_n"
:
32
,
"chip_select"
:
6
,
"cpld_device"
:
"urukul0_cpld"
,
"sw_device"
:
"ttl_urukul0_sw2"
}
}
device_db
[
"urukul0_ch3"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ad9910"
,
"class"
:
"AD9910"
,
"arguments"
:
{
"pll_n"
:
32
,
"chip_select"
:
7
,
"cpld_device"
:
"urukul0_cpld"
,
"sw_device"
:
"ttl_urukul0_sw3"
}
}
device_db
[
"led0"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000e
}
}
device_db
[
"led1"
]
=
{
"type"
:
"local"
,
"module"
:
"artiq.coredevice.ttl"
,
"class"
:
"TTLOut"
,
"arguments"
:
{
"channel"
:
0x00000f
}
}
artiq_master/repository/pmt_count.py
0 → 100644
View file @
88e8aa55
import
numpy
as
np
import
sys
import
os
from
datetime
import
datetime
from
artiq.experiment
import
*
class
PruebaEdgeCounter
(
EnvExperiment
):
def
build
(
self
):
self
.
setattr_device
(
"core"
)
self
.
pmt_counter
=
self
.
get_device
(
"ttl4_counter"
)
@
kernel
def
run
(
self
):
self
.
core
.
reset
()
for
_
in
range
(
50
):
self
.
core
.
break_realtime
()
self
.
pmt_counter
.
gate_rising
(
100
*
us
)
print
(
"Counts:"
,
self
.
pmt_counter
.
fetch_count
())
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment